Hjgugugjhuhjggg commited on
Commit
3d5534f
·
verified ·
1 Parent(s): 1064fad

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -176,7 +176,7 @@ class S3DirectStream:
176
  try:
177
  api = HfApi()
178
  model_files = api.list_repo_files(model_prefix, revision=revision)
179
- model_files = [file.rfilename for file in model_files if file.rfilename.endswith(('.bin', '.safetensors'))]
180
  return model_files
181
  except Exception as e:
182
  logger.error(f"Error retrieving model files from Hugging Face: {e}")
 
176
  try:
177
  api = HfApi()
178
  model_files = api.list_repo_files(model_prefix, revision=revision)
179
+ model_files = [file["rfilename"] for file in model_files if file["rfilename"].endswith(('.bin', '.safetensors'))]
180
  return model_files
181
  except Exception as e:
182
  logger.error(f"Error retrieving model files from Hugging Face: {e}")