Update app.py
Browse files
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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():
|