gensim2 commited on
Commit
02f2fd9
·
1 Parent(s): 995b26b

update gradio

Browse files
Files changed (1) hide show
  1. gensim/sim_runner.py +4 -4
gensim/sim_runner.py CHANGED
@@ -151,7 +151,7 @@ class BuildWheel(Task):
151
  to_print = highlight(f"{str(traceback.format_exc())}", PythonLexer(), TerminalFormatter())
152
  print("Task Creation Exception:", to_print)
153
 
154
- raise gradio.Warning(f"Task Creation Exception: {str(traceback.format_exc())}")
155
  self.task_creation_pass = False
156
 
157
  # self.curr_task_name = self.generated_task['task-name']
@@ -190,7 +190,7 @@ class BuildWheel(Task):
190
  except:
191
  to_print = highlight(f"{str(traceback.format_exc())}", PythonLexer(), TerminalFormatter())
192
  print("Task Creation Exception:", to_print)
193
- raise gradio.Warning(f"Task Creation Exception: {str(traceback.format_exc())}")
194
  self.task_creation_pass = False
195
 
196
  # self.curr_task_name = self.generated_task['task-name']
@@ -281,7 +281,7 @@ class BuildWheel(Task):
281
  save_text(self.cfg['model_output_dir'], self.generated_task_name + '_error', str(traceback.format_exc()))
282
  print("========================================================")
283
  print("Syntax Exception:", to_print)
284
- raise gradio.Warning(f"Syntax Exception: {str(traceback.format_exc())}")
285
  return
286
 
287
  try:
@@ -352,5 +352,5 @@ class BuildWheel(Task):
352
  print("========================================================")
353
  print("Runtime Exception:", to_print)
354
 
355
- raise gradio.Warning(f"Runtime Exception: {str(traceback.format_exc())}")
356
  self.memory.save_run(self.generated_task)
 
151
  to_print = highlight(f"{str(traceback.format_exc())}", PythonLexer(), TerminalFormatter())
152
  print("Task Creation Exception:", to_print)
153
 
154
+ raise gradio.Error(f"Task Creation Exception: {str(traceback.format_exc())}")
155
  self.task_creation_pass = False
156
 
157
  # self.curr_task_name = self.generated_task['task-name']
 
190
  except:
191
  to_print = highlight(f"{str(traceback.format_exc())}", PythonLexer(), TerminalFormatter())
192
  print("Task Creation Exception:", to_print)
193
+ raise gradio.Error(f"Task Creation Exception: {str(traceback.format_exc())}")
194
  self.task_creation_pass = False
195
 
196
  # self.curr_task_name = self.generated_task['task-name']
 
281
  save_text(self.cfg['model_output_dir'], self.generated_task_name + '_error', str(traceback.format_exc()))
282
  print("========================================================")
283
  print("Syntax Exception:", to_print)
284
+ raise gradio.Error(f"Syntax Exception: {str(traceback.format_exc())}")
285
  return
286
 
287
  try:
 
352
  print("========================================================")
353
  print("Runtime Exception:", to_print)
354
 
355
+ raise gradio.Error(f"Runtime Exception: {str(traceback.format_exc())}")
356
  self.memory.save_run(self.generated_task)