elibrowne commited on
Commit
0e6d7d7
·
1 Parent(s): ac813df

Toggle out of scope probably...

Browse files
Files changed (1) hide show
  1. app.py +10 -11
app.py CHANGED
@@ -185,11 +185,11 @@ with gr.Blocks(theme = theme) as user_eval:
185
  }
186
  else:
187
  return {
188
- toggle(outputs = [scores_p, scores_g, evals, question])
189
  }
190
  else:
191
  return {
192
- toggle(outputs = [scores_p, scores_g, evals, question])
193
  }
194
 
195
  btn_p.click(fn = next_p, inputs = [eval_1, eval_2, eval_3], outputs = [selection, scores_p, scores_g])
@@ -217,15 +217,14 @@ with gr.Blocks(theme = theme) as user_eval:
217
  c.click(fn = answer, outputs = [question, evals])
218
  d.click(fn = answer, outputs = [question, evals])
219
 
220
- def toggle():
221
- global step
222
- step = 0
223
- return {
224
- scores_p: gr.Column(visible = True),
225
- scores_g: gr.Column(visible = False),
226
- evals: gr.Row(visible = False),
227
- question: gr.Row(visible = True)
228
- }
229
 
230
  with gr.Row() as login:
231
  with gr.Column():
 
185
  }
186
  else:
187
  return {
188
+ toggle(scores_p, scores_g, evals, question) # outputs = [scores_p, scores_g, evals, question]
189
  }
190
  else:
191
  return {
192
+ toggle(scores_p, scores_g, evals, question)
193
  }
194
 
195
  btn_p.click(fn = next_p, inputs = [eval_1, eval_2, eval_3], outputs = [selection, scores_p, scores_g])
 
217
  c.click(fn = answer, outputs = [question, evals])
218
  d.click(fn = answer, outputs = [question, evals])
219
 
220
+ def toggle(scores_p, scores_g, evals, question):
221
+ global step
222
+ step = 0
223
+
224
+ scores_p = gr.Column(visible = True)
225
+ scores_g = gr.Column(visible = False)
226
+ evals = gr.Row(visible = False),
227
+ question = gr.Row(visible = True)
 
228
 
229
  with gr.Row() as login:
230
  with gr.Column():