Update app.py
Browse files
app.py
CHANGED
@@ -108,16 +108,7 @@ 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 Exception as e:
|
111 |
-
|
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 |
|
|
|
108 |
print("success update", model_name)
|
109 |
return gr.update(visible=False), gr.update(visible=True), gr.update(visible=False)
|
110 |
except Exception as e:
|
111 |
+
return gr.update(visible=True, value=f"Error: {e}"), gr.update(visible=False), gr.update(visible=True, value=f"Error: {e}")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
112 |
# return gr.update(visible=True), gr.update(visible=False), gr.update(visible=True)
|
113 |
|
114 |
|