Spaces:
Sleeping
Sleeping
Saiteja Solleti
commited on
Commit
·
4601ab4
1
Parent(s):
0d85ff6
popup
Browse files
app.py
CHANGED
@@ -124,8 +124,9 @@ with gr.Blocks() as iface:
|
|
124 |
|
125 |
submit_button = gr.Button("Evaluate Model")
|
126 |
|
127 |
-
|
128 |
-
|
|
|
129 |
|
130 |
with gr.Row():
|
131 |
with gr.Column():
|
@@ -151,7 +152,11 @@ with gr.Blocks() as iface:
|
|
151 |
|
152 |
|
153 |
# Connect submit button to evaluation function
|
154 |
-
submit_button.click(
|
|
|
|
|
|
|
|
|
155 |
|
156 |
# Run the Gradio app
|
157 |
iface.launch()
|
|
|
124 |
|
125 |
submit_button = gr.Button("Evaluate Model")
|
126 |
|
127 |
+
with gr.Modal() as error_popup:
|
128 |
+
gr.Markdown("⚠️ **Error Alert**")
|
129 |
+
error_text = gr.Textbox(interactive=False, show_label=False)
|
130 |
|
131 |
with gr.Row():
|
132 |
with gr.Column():
|
|
|
152 |
|
153 |
|
154 |
# Connect submit button to evaluation function
|
155 |
+
submit_button.click(
|
156 |
+
EvaluateRAGModel,
|
157 |
+
inputs=[question_input, dropdown_input,reranker_dropdown],
|
158 |
+
outputs=[response, rmsecontextrel, rmsecontextutil, aucscore, processingTime, error_text]
|
159 |
+
).then(error_popup.show, inputs=[], outputs=[])
|
160 |
|
161 |
# Run the Gradio app
|
162 |
iface.launch()
|