elibrowne commited on
Commit
2787b29
·
1 Parent(s): 0c26604

New toggle mechanism?

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -87,7 +87,7 @@ user_id = "NO_ID"
87
 
88
  with gr.Blocks(theme = theme) as user_eval:
89
  # Title text introducing study
90
- forward_btn = gr.HTML("unchanged", visible = False, elem_id = "togglebutton")
91
  gr.HTML("""
92
  <h1> Legal Retriever Evaluation Study </h1>
93
  <p> Score the passages based on the question and provided answer choices. Detailed instructions are found <a href="https://docs.google.com/document/d/1ReODJ0hlXz_M3kE2UG1cwSRVoyDLQo88OvG71Gt8lUQ/edit?usp=sharing" target="_blank">here</a>. </p>
@@ -178,24 +178,24 @@ with gr.Blocks(theme = theme) as user_eval:
178
  selection: gr.HTML("""
179
  <h2> Retrieved Passage </h2> <br />
180
  """ + gold_passage),
181
- forward_btn: gr.Button()
182
  }
183
  elif step == 13:
184
  return {
185
  selection: gr.HTML("""
186
  <h2> Autogenerated Response </h2> <br />
187
  """ + gold_passage_generation),
188
- forward_btn: gr.Button()
189
  }
190
  else:
191
  return {
192
  selection: gr.Markdown("Click the button to advance to the next question."),
193
- forward_btn: gr.HTML("changed")
194
  }
195
  else:
196
  return {
197
  selection: gr.Markdown("Click the button to advance to the next question."),
198
- forward_btn: gr.HTML("changed")
199
  }
200
 
201
  btn_p.click(fn = next_p, inputs = [eval_1, eval_2, eval_3], outputs = [selection, scores_p, scores_g])
 
87
 
88
  with gr.Blocks(theme = theme) as user_eval:
89
  # Title text introducing study
90
+ forward_btn = gr.Textbox("unchanged", visible = False, elem_id = "togglebutton")
91
  gr.HTML("""
92
  <h1> Legal Retriever Evaluation Study </h1>
93
  <p> Score the passages based on the question and provided answer choices. Detailed instructions are found <a href="https://docs.google.com/document/d/1ReODJ0hlXz_M3kE2UG1cwSRVoyDLQo88OvG71Gt8lUQ/edit?usp=sharing" target="_blank">here</a>. </p>
 
178
  selection: gr.HTML("""
179
  <h2> Retrieved Passage </h2> <br />
180
  """ + gold_passage),
181
+ forward_btn: gr.Textbox()
182
  }
183
  elif step == 13:
184
  return {
185
  selection: gr.HTML("""
186
  <h2> Autogenerated Response </h2> <br />
187
  """ + gold_passage_generation),
188
+ forward_btn: gr.Textbox()
189
  }
190
  else:
191
  return {
192
  selection: gr.Markdown("Click the button to advance to the next question."),
193
+ forward_btn: gr.Textbox("changed")
194
  }
195
  else:
196
  return {
197
  selection: gr.Markdown("Click the button to advance to the next question."),
198
+ forward_btn: gr.Textbox("changed")
199
  }
200
 
201
  btn_p.click(fn = next_p, inputs = [eval_1, eval_2, eval_3], outputs = [selection, scores_p, scores_g])