tasal9 commited on
Commit
d9f0120
·
1 Parent(s): d565b55

Add huggingface_hub to requirements.txt for improved model support

Browse files
Files changed (2) hide show
  1. app.py +2 -1
  2. requirements.txt +1 -0
app.py CHANGED
@@ -104,7 +104,8 @@ def get_generator(model_id: str = MODEL_ID, cache_dir: Optional[str] = CACHE_DIR
104
  local_model_path = None
105
  # Try to download a local snapshot first (ensures a filesystem path string)
106
  try:
107
- import importlib
 
108
  hf = importlib.import_module("huggingface_hub")
109
  snapshot_download = getattr(hf, "snapshot_download", None)
110
  if snapshot_download:
 
104
  local_model_path = None
105
  # Try to download a local snapshot first (ensures a filesystem path string)
106
  try:
107
+ impor
108
+
109
  hf = importlib.import_module("huggingface_hub")
110
  snapshot_download = getattr(hf, "snapshot_download", None)
111
  if snapshot_download:
requirements.txt CHANGED
@@ -2,5 +2,6 @@ gradio
2
  transformers>=4.42.4
3
  torch
4
  sentencepiece
 
5
  huggingface-hub
6
 
 
2
  transformers>=4.42.4
3
  torch
4
  sentencepiece
5
+ huggingface_hub
6
  huggingface-hub
7