qdqd commited on
Commit
abca836
Β·
verified Β·
1 Parent(s): a78ec9c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -70,8 +70,13 @@ AUTHORIZED_IMPORTS = [
70
  "csv",
71
  ]
72
  import os
 
 
 
73
  from huggingface_hub import configure_http_backend
74
- configure_http_backend(backends=["httpx"]) # More stable backend
 
 
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