Spaces:
Sleeping
Sleeping
Synced repo using 'sync_with_huggingface' Github Action
Browse filesoriginal:
- remote: "https://github.com/xiaoyao9184/convert-to-genai"
- commit: "a9ad43e29b0be05b9946323347b26d2affce76f0"
sync_with_huggingface:
- repository: ""
- ref: ""
app.py
CHANGED
@@ -365,9 +365,12 @@ class ModelConverter:
|
|
365 |
yield f"🆘 `{task_name}` Upload Error: {e}"
|
366 |
else:
|
367 |
raise e
|
368 |
-
return hf_model_url
|
369 |
-
finally:
|
370 |
shutil.rmtree(model_folder_path, ignore_errors=True)
|
|
|
|
|
|
|
|
|
|
|
371 |
|
372 |
def generate_readme(self, imi: str):
|
373 |
return (
|
|
|
365 |
yield f"🆘 `{task_name}` Upload Error: {e}"
|
366 |
else:
|
367 |
raise e
|
|
|
|
|
368 |
shutil.rmtree(model_folder_path, ignore_errors=True)
|
369 |
+
return hf_model_url
|
370 |
+
except Exception as e:
|
371 |
+
if 'SPACE_ID' in os.environ:
|
372 |
+
shutil.rmtree(model_folder_path, ignore_errors=True)
|
373 |
+
raise
|
374 |
|
375 |
def generate_readme(self, imi: str):
|
376 |
return (
|