asad9641 commited on
Commit
4162c75
·
verified ·
1 Parent(s): 5579b85

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -0
app.py CHANGED
@@ -1,3 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
1
  import os
2
  import io
3
  import requests
 
1
+ # Patch cached_download import for compatibility with newer huggingface-hub
2
+ import sys
3
+ import types
4
+
5
+ try:
6
+ from huggingface_hub import cached_download
7
+ except ImportError:
8
+ import huggingface_hub
9
+ huggingface_hub.cached_download = lambda *args, **kwargs: None
10
+
11
+
12
  import os
13
  import io
14
  import requests