Spaces:
Runtime error
Runtime error
throw everything in
Browse files
app.py
CHANGED
@@ -66,9 +66,9 @@ def load_models(language):
|
|
66 |
if model_path.startswith('http'):
|
67 |
if not exists(file_name):
|
68 |
print(f"Downloading {model_path}")
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
else:
|
73 |
print(f"Found {file_name}. Skipping download...")
|
74 |
return Model(file_name)
|
|
|
66 |
if model_path.startswith('http'):
|
67 |
if not exists(file_name):
|
68 |
print(f"Downloading {model_path}")
|
69 |
+
r = requests.get(model_path, allow_redirects=True)
|
70 |
+
with open(file_name, 'wb') as file:
|
71 |
+
file.write(r.content)
|
72 |
else:
|
73 |
print(f"Found {file_name}. Skipping download...")
|
74 |
return Model(file_name)
|