Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -233,12 +233,12 @@ if (runModel=='1'):
|
|
233 |
#overwrite=True # Force overwrite existing files
|
234 |
)
|
235 |
|
236 |
-
|
237 |
# Loop through and delete files that belong to a specific folder
|
238 |
folder_prefix = "data-timeframe_tokenizer/" # Replace with your folder's name
|
239 |
-
for file in
|
240 |
if file.startswith(folder_prefix):
|
241 |
-
api.delete_file(
|
242 |
print(f"Deleted: {file}")
|
243 |
|
244 |
tokenizer_files = os.listdir(tokenizer_path)
|
|
|
233 |
#overwrite=True # Force overwrite existing files
|
234 |
)
|
235 |
|
236 |
+
repo_files = api.list_repo_files(repo_name)
|
237 |
# Loop through and delete files that belong to a specific folder
|
238 |
folder_prefix = "data-timeframe_tokenizer/" # Replace with your folder's name
|
239 |
+
for file in repo_files:
|
240 |
if file.startswith(folder_prefix):
|
241 |
+
api.delete_file(repo_name, path=file)
|
242 |
print(f"Deleted: {file}")
|
243 |
|
244 |
tokenizer_files = os.listdir(tokenizer_path)
|