Spaces:
Sleeping
Sleeping
elibrowne
commited on
Commit
·
95cc5b2
1
Parent(s):
0e6d7d7
Toggle out of scope probably...
Browse files
app.py
CHANGED
|
@@ -185,11 +185,11 @@ with gr.Blocks(theme = theme) as user_eval:
|
|
| 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])
|
|
@@ -217,14 +217,15 @@ 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 |
-
|
| 222 |
-
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
|
|
|
| 228 |
|
| 229 |
with gr.Row() as login:
|
| 230 |
with gr.Column():
|
|
|
|
| 185 |
}
|
| 186 |
else:
|
| 187 |
return {
|
| 188 |
+
user_eval.load(toggle, inputs = None, outputs = [scores_p, scores_g, evals, question])
|
| 189 |
}
|
| 190 |
else:
|
| 191 |
return {
|
| 192 |
+
user_eval.load(toggle, inputs = None, 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 |
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():
|