Howieeeee commited on
Commit
503dd68
·
verified ·
1 Parent(s): 0e225ee

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -1
app.py CHANGED
@@ -108,7 +108,17 @@ def add_new_eval(
108
  print("success update", model_name)
109
  return gr.update(visible=False), gr.update(visible=True), gr.update(visible=False)
110
  except:
111
- return gr.update(visible=True), gr.update(visible=False), gr.update(visible=True)
 
 
 
 
 
 
 
 
 
 
112
 
113
 
114
  def get_baseline_df():
 
108
  print("success update", model_name)
109
  return gr.update(visible=False), gr.update(visible=True), gr.update(visible=False)
110
  except:
111
+ # get the full traceback as a string
112
+ tb = traceback.format_exc()
113
+ # log it to the console (optional)
114
+ print(tb)
115
+ # return it into your “fail_textbox” component
116
+ return (
117
+ gr.update(visible=True, value=f"❌ Error: {e}"),
118
+ gr.update(visible=False),
119
+ gr.update(visible=True, value=f"<pre>{tb}</pre>")
120
+ )
121
+ # return gr.update(visible=True), gr.update(visible=False), gr.update(visible=True)
122
 
123
 
124
  def get_baseline_df():