Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -42,10 +42,10 @@ class ModelManager:
|
|
42 |
for config in model_configs:
|
43 |
with BytesIO() as model_data:
|
44 |
download_url = f"https://huggingface.co/{config['repo_id']}/resolve/main/{config['filename']}"
|
45 |
-
response = requests.get(download_url, headers={"Authorization": f"Bearer {HUGGINGFACE_TOKEN}",
|
46 |
|
47 |
for chunk in response.iter_content(chunk_size=1024*1024):
|
48 |
-
if chunk:
|
49 |
model_data.write(chunk)
|
50 |
|
51 |
model_data.seek(0)
|
|
|
42 |
for config in model_configs:
|
43 |
with BytesIO() as model_data:
|
44 |
download_url = f"https://huggingface.co/{config['repo_id']}/resolve/main/{config['filename']}"
|
45 |
+
response = requests.get(download_url, headers={"Authorization": f"Bearer {HUGGINGFACE_TOKEN}"}, stream=True)
|
46 |
|
47 |
for chunk in response.iter_content(chunk_size=1024*1024):
|
48 |
+
if chunk:
|
49 |
model_data.write(chunk)
|
50 |
|
51 |
model_data.seek(0)
|