xiaoyao9184 commited on
Commit
d2c23bb
·
verified ·
1 Parent(s): 79668c3

Synced repo using 'sync_with_huggingface' Github Action

Browse files

original:
- remote: "https://github.com/xiaoyao9184/convert-to-genai"
- commit: "a9ad43e29b0be05b9946323347b26d2affce76f0"
sync_with_huggingface:
- repository: ""
- ref: ""

Files changed (1) hide show
  1. app.py +5 -2
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 (