Spaces:
Runtime error
Runtime error
saattrupdan
commited on
Commit
·
1410875
1
Parent(s):
c2ee91b
fix: Rename load to save
Browse files
app.py
CHANGED
@@ -59,7 +59,7 @@ def main():
|
|
59 |
with gr.Column():
|
60 |
correct_btn = gr.Button(value="Correct")
|
61 |
incorrect_btn = gr.Button(value="Incorrect")
|
62 |
-
|
63 |
|
64 |
correct_btn.click(
|
65 |
fn=partial(assign_correct, itr=itr),
|
@@ -71,7 +71,7 @@ def main():
|
|
71 |
inputs=[idx_box, question_box, answer_box],
|
72 |
outputs=[idx_box, question_box, answer_box],
|
73 |
)
|
74 |
-
|
75 |
|
76 |
auth = [
|
77 |
("admin", os.environ["ADMIN_PASSWORD"]),
|
@@ -80,7 +80,7 @@ def main():
|
|
80 |
demo.launch(auth=auth)
|
81 |
|
82 |
|
83 |
-
def
|
84 |
"""Update the FoQA dataset with the validation status of a sample."""
|
85 |
logger.info("Saving results...")
|
86 |
gr.Info(message="Saving results...")
|
|
|
59 |
with gr.Column():
|
60 |
correct_btn = gr.Button(value="Correct")
|
61 |
incorrect_btn = gr.Button(value="Incorrect")
|
62 |
+
save_results_btn = gr.Button(value="Save results")
|
63 |
|
64 |
correct_btn.click(
|
65 |
fn=partial(assign_correct, itr=itr),
|
|
|
71 |
inputs=[idx_box, question_box, answer_box],
|
72 |
outputs=[idx_box, question_box, answer_box],
|
73 |
)
|
74 |
+
save_results_btn.click(fn=save_results)
|
75 |
|
76 |
auth = [
|
77 |
("admin", os.environ["ADMIN_PASSWORD"]),
|
|
|
80 |
demo.launch(auth=auth)
|
81 |
|
82 |
|
83 |
+
def save_results() -> None:
|
84 |
"""Update the FoQA dataset with the validation status of a sample."""
|
85 |
logger.info("Saving results...")
|
86 |
gr.Info(message="Saving results...")
|