elibrowne commited on
Commit
5338729
1 Parent(s): dc4c04d

Toggle out of scope probably...

Browse files
Files changed (1) hide show
  1. app.py +13 -4
app.py CHANGED
@@ -185,14 +185,13 @@ with gr.Blocks(theme = theme) as user_eval:
185
  }
186
  else:
187
  return {
188
- selection: gr.HTML("TOGGLE INCOMING")
189
  }
190
  else:
191
  return {
192
- selection: gr.HTML("TOGGLE INCOMING")
193
  }
194
-
195
-
196
  btn_p.click(fn = next_p, inputs = [eval_1, eval_2, eval_3], outputs = [selection, scores_p, scores_g])
197
  btn_g.click(fn = next_g, inputs = [eval_helps, eval_satisfied], outputs = [selection])
198
 
@@ -217,6 +216,16 @@ with gr.Blocks(theme = theme) as user_eval:
217
  b.click(fn = answer, outputs = [question, evals])
218
  c.click(fn = answer, outputs = [question, evals])
219
  d.click(fn = answer, outputs = [question, evals])
 
 
 
 
 
 
 
 
 
 
220
 
221
  with gr.Row() as login:
222
  with gr.Column():
 
185
  }
186
  else:
187
  return {
188
+ toggle()
189
  }
190
  else:
191
  return {
192
+ toggle()
193
  }
194
+
 
195
  btn_p.click(fn = next_p, inputs = [eval_1, eval_2, eval_3], outputs = [selection, scores_p, scores_g])
196
  btn_g.click(fn = next_g, inputs = [eval_helps, eval_satisfied], outputs = [selection])
197
 
 
216
  b.click(fn = answer, outputs = [question, evals])
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():