Saiteja Solleti commited on
Commit
5633e27
·
1 Parent(s): 1432cc9

correcting scores

Browse files
Files changed (1) hide show
  1. app.py +10 -8
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("### Output 1")
92
  response = gr.Textbox(interactive=False, show_label=False, lines=2)
93
 
94
  with gr.Row():
95
  with gr.Column():
96
- gr.Markdown("### Output 2")
97
- output2 = gr.Textbox(interactive=False, show_label=False, lines=2)
98
 
99
  with gr.Column():
100
- gr.Markdown("### Output 3")
101
- output3 = gr.Textbox(interactive=False, show_label=False, lines=2)
102
 
103
  with gr.Column():
104
- gr.Markdown("### Output 4")
105
- output4 = gr.Textbox(interactive=False, show_label=False, lines=2)
106
 
107
  # Connect submit button to evaluation function
108
- submit_button.click(EvaluateRAGModel, inputs=[question_input, dropdown_input], outputs=[response, output2, output3, output4])
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()