camenduru commited on
Commit
fd84524
1 Parent(s): 984fef6

Update worker_runpod.py

Browse files
Files changed (1) hide show
  1. worker_runpod.py +4 -2
worker_runpod.py CHANGED
@@ -207,8 +207,10 @@ def generate(input):
207
  except Exception as e:
208
  print(f"An unexpected error occurred: {e}")
209
  finally:
210
- if os.path.exists(result):
211
- os.remove(result)
 
 
212
 
213
  if response and response.status_code == 200:
214
  try:
 
207
  except Exception as e:
208
  print(f"An unexpected error occurred: {e}")
209
  finally:
210
+ if os.path.exists(file_path):
211
+ os.remove(file_path)
212
+ for path in file_paths:
213
+ os.remove(path)
214
 
215
  if response and response.status_code == 200:
216
  try: