Spaces:
Sleeping
Sleeping
Saiteja Solleti
commited on
Commit
·
5633e27
1
Parent(s):
1432cc9
correcting scores
Browse files
app.py
CHANGED
@@ -71,6 +71,8 @@ def EvaluateRAGModel(query, evaluation_model):
|
|
71 |
print(rmsecontextutil)
|
72 |
print(aucscore)
|
73 |
|
|
|
|
|
74 |
|
75 |
# Create Gradio UI
|
76 |
with gr.Blocks() as iface:
|
@@ -88,24 +90,24 @@ with gr.Blocks() as iface:
|
|
88 |
|
89 |
with gr.Row():
|
90 |
with gr.Column():
|
91 |
-
gr.Markdown("###
|
92 |
response = gr.Textbox(interactive=False, show_label=False, lines=2)
|
93 |
|
94 |
with gr.Row():
|
95 |
with gr.Column():
|
96 |
-
gr.Markdown("###
|
97 |
-
|
98 |
|
99 |
with gr.Column():
|
100 |
-
gr.Markdown("###
|
101 |
-
|
102 |
|
103 |
with gr.Column():
|
104 |
-
gr.Markdown("###
|
105 |
-
|
106 |
|
107 |
# Connect submit button to evaluation function
|
108 |
-
submit_button.click(EvaluateRAGModel, inputs=[question_input, dropdown_input], outputs=[response,
|
109 |
|
110 |
# Run the Gradio app
|
111 |
iface.launch()
|
|
|
71 |
print(rmsecontextutil)
|
72 |
print(aucscore)
|
73 |
|
74 |
+
return answer, rmsecontextrel, rmsecontextutil, aucscore
|
75 |
+
|
76 |
|
77 |
# Create Gradio UI
|
78 |
with gr.Blocks() as iface:
|
|
|
90 |
|
91 |
with gr.Row():
|
92 |
with gr.Column():
|
93 |
+
gr.Markdown("### Response")
|
94 |
response = gr.Textbox(interactive=False, show_label=False, lines=2)
|
95 |
|
96 |
with gr.Row():
|
97 |
with gr.Column():
|
98 |
+
gr.Markdown("### RMSE-CONTEXT RELEVANCE")
|
99 |
+
rmsecontextrel = gr.Textbox(interactive=False, show_label=False, lines=2)
|
100 |
|
101 |
with gr.Column():
|
102 |
+
gr.Markdown("### RMSE-CONTEXT UTILIZATION")
|
103 |
+
rmsecontextutil = gr.Textbox(interactive=False, show_label=False, lines=2)
|
104 |
|
105 |
with gr.Column():
|
106 |
+
gr.Markdown("### AUCROC ADHERENCE")
|
107 |
+
aucscore = gr.Textbox(interactive=False, show_label=False, lines=2)
|
108 |
|
109 |
# Connect submit button to evaluation function
|
110 |
+
submit_button.click(EvaluateRAGModel, inputs=[question_input, dropdown_input], outputs=[response, rmsecontextrel, rmsecontextutil, aucscore])
|
111 |
|
112 |
# Run the Gradio app
|
113 |
iface.launch()
|