elibrowne commited on
Commit
8fcc488
·
1 Parent(s): 22f31fd

Reset inputs after score

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -121,12 +121,16 @@ with gr.Blocks(theme = theme) as user_eval:
121
  with gr.Column(scale = 1) as scores_p:
122
  desc_0 = gr.Markdown("Does the passage describe **a legal rule?**")
123
  eval_0 = gr.Radio(["Yes", "No"], label = "Legal Rule?")
 
124
  desc_1 = gr.Markdown("How **relevant** is this passage to the question?")
125
  eval_1 = gr.Slider(1, 5, step = 0.5, label = "Relevance")
 
126
  desc_2 = gr.Markdown("How would you rate the passage's **quality** in terms of detail, clarity, and focus?")
127
  eval_2 = gr.Slider(1, 5, step = 0.5, label = "Quality")
 
128
  desc_3 = gr.Markdown("How effectively does the passage **lead you to the correct answer?**")
129
  eval_3 = gr.Slider(1, 5, step = 0.5, label = "Helpfulness")
 
130
  btn_p = gr.Button("Next")
131
 
132
  with gr.Column(scale = 1, visible = False) as scores_g:
 
121
  with gr.Column(scale = 1) as scores_p:
122
  desc_0 = gr.Markdown("Does the passage describe **a legal rule?**")
123
  eval_0 = gr.Radio(["Yes", "No"], label = "Legal Rule?")
124
+ eval_0.submit(lambda x : gr.update(value = ''), [], [eval_0])
125
  desc_1 = gr.Markdown("How **relevant** is this passage to the question?")
126
  eval_1 = gr.Slider(1, 5, step = 0.5, label = "Relevance")
127
+ eval_1.submit(lambda x : gr.update(value = ''), [], [eval_1])
128
  desc_2 = gr.Markdown("How would you rate the passage's **quality** in terms of detail, clarity, and focus?")
129
  eval_2 = gr.Slider(1, 5, step = 0.5, label = "Quality")
130
+ eval_2.submit(lambda x : gr.update(value = ''), [], [eval_2])
131
  desc_3 = gr.Markdown("How effectively does the passage **lead you to the correct answer?**")
132
  eval_3 = gr.Slider(1, 5, step = 0.5, label = "Helpfulness")
133
+ eval_3.submit(lambda x : gr.update(value = ''), [], [eval_3])
134
  btn_p = gr.Button("Next")
135
 
136
  with gr.Column(scale = 1, visible = False) as scores_g: