Spaces:
Sleeping
Sleeping
elibrowne
commited on
Commit
·
4072549
1
Parent(s):
7aceb13
State?
Browse files
app.py
CHANGED
|
@@ -396,36 +396,40 @@ with gr.Blocks(theme = theme) as user_eval:
|
|
| 396 |
d = gr.Button("D")
|
| 397 |
|
| 398 |
# I know this is inefficient...
|
| 399 |
-
def answer_a():
|
| 400 |
-
|
| 401 |
-
|
| 402 |
return {
|
| 403 |
question: gr.Row(visible = False),
|
| 404 |
-
evals: gr.Row(visible = True)
|
|
|
|
| 405 |
}
|
| 406 |
-
def answer_b():
|
| 407 |
-
|
| 408 |
-
|
| 409 |
return {
|
| 410 |
question: gr.Row(visible = False),
|
| 411 |
-
evals: gr.Row(visible = True)
|
|
|
|
| 412 |
}
|
| 413 |
-
def answer_c():
|
| 414 |
-
|
| 415 |
-
|
| 416 |
return {
|
| 417 |
question: gr.Row(visible = False),
|
| 418 |
-
evals: gr.Row(visible = True)
|
|
|
|
| 419 |
}
|
| 420 |
def answer_d():
|
| 421 |
-
|
| 422 |
-
|
| 423 |
return {
|
| 424 |
question: gr.Row(visible = False),
|
| 425 |
-
evals: gr.Row(visible = True)
|
|
|
|
| 426 |
}
|
| 427 |
|
| 428 |
-
a.click(fn = answer_a, outputs = [question, evals])
|
| 429 |
b.click(fn = answer_b, outputs = [question, evals])
|
| 430 |
c.click(fn = answer_c, outputs = [question, evals])
|
| 431 |
d.click(fn = answer_d, outputs = [question, evals])
|
|
|
|
| 396 |
d = gr.Button("D")
|
| 397 |
|
| 398 |
# I know this is inefficient...
|
| 399 |
+
def answer_a(current_response):
|
| 400 |
+
cr = current_response
|
| 401 |
+
cr["user_answer"] = 0
|
| 402 |
return {
|
| 403 |
question: gr.Row(visible = False),
|
| 404 |
+
evals: gr.Row(visible = True),
|
| 405 |
+
current_response: cr
|
| 406 |
}
|
| 407 |
+
def answer_b(current_response):
|
| 408 |
+
cr = current_response
|
| 409 |
+
cr["user_answer"] = 1
|
| 410 |
return {
|
| 411 |
question: gr.Row(visible = False),
|
| 412 |
+
evals: gr.Row(visible = True),
|
| 413 |
+
current_response: cr
|
| 414 |
}
|
| 415 |
+
def answer_c(current_response):
|
| 416 |
+
cr = current_response
|
| 417 |
+
cr["user_answer"] = 2
|
| 418 |
return {
|
| 419 |
question: gr.Row(visible = False),
|
| 420 |
+
evals: gr.Row(visible = True),
|
| 421 |
+
current_response: cr
|
| 422 |
}
|
| 423 |
def answer_d():
|
| 424 |
+
cr = current_response
|
| 425 |
+
cr["user_answer"] = 3
|
| 426 |
return {
|
| 427 |
question: gr.Row(visible = False),
|
| 428 |
+
evals: gr.Row(visible = True),
|
| 429 |
+
current_response: cr
|
| 430 |
}
|
| 431 |
|
| 432 |
+
a.click(fn = answer_a, inputs = [current_response], outputs = [question, evals, current_response])
|
| 433 |
b.click(fn = answer_b, outputs = [question, evals])
|
| 434 |
c.click(fn = answer_c, outputs = [question, evals])
|
| 435 |
d.click(fn = answer_d, outputs = [question, evals])
|