We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 502b821 commit f77d1c1Copy full SHA for f77d1c1
src/inferencesh/sdk.py
@@ -39,7 +39,6 @@ class File(BaseModel):
39
def __init__(self, **data):
40
super().__init__(**data)
41
if self._is_url(self.path):
42
- print(f"Downloading URL: {self.path}")
43
self._download_url()
44
elif not os.path.isabs(self.path):
45
self.path = os.path.abspath(self.path)
@@ -60,7 +59,11 @@ def _download_url(self) -> None:
60
59
61
# Set up request with user agent
62
headers = {
63
- 'User-Agent': 'inference.sh'
+ 'User-Agent': (
+ 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) '
64
+ 'AppleWebKit/537.36 (KHTML, like Gecko) '
65
+ 'Chrome/91.0.4472.124 Safari/537.36'
66
+ )
67
}
68
req = urllib.request.Request(original_url, headers=headers)
69
0 commit comments