Spaces:
Sleeping
Sleeping
Hjgugugjhuhjggg
commited on
Update app.py
Browse files
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
|
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}")
|