Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -70,8 +70,13 @@ AUTHORIZED_IMPORTS = [
|
|
70 |
"csv",
|
71 |
]
|
72 |
import os
|
|
|
|
|
|
|
73 |
from huggingface_hub import configure_http_backend
|
74 |
-
|
|
|
|
|
75 |
|
76 |
# Set environment variables before other imports
|
77 |
os.environ["HF_HUB_DOWNLOAD_TIMEOUT"] = "300" # 5 minute timeout
|
|
|
70 |
"csv",
|
71 |
]
|
72 |
import os
|
73 |
+
|
74 |
+
|
75 |
+
# With this updated version:
|
76 |
from huggingface_hub import configure_http_backend
|
77 |
+
from huggingface_hub.http import httpx_backend # Explicit backend import
|
78 |
+
configure_http_backend(factory=httpx_backend.factory) # Correct argument [huggingface.co](https://huggingface.co/docs/huggingface_hub/en/guides/http#http-backends)
|
79 |
+
|
80 |
|
81 |
# Set environment variables before other imports
|
82 |
os.environ["HF_HUB_DOWNLOAD_TIMEOUT"] = "300" # 5 minute timeout
|