Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -76,8 +76,7 @@ def onSubmit(radio, scorebox):
|
|
| 76 |
updateScore(radio)
|
| 77 |
input_column = gr.Column(visible=False)
|
| 78 |
output_column = gr.Column(visible=True)
|
| 79 |
-
|
| 80 |
-
results = f"{answer} is correct. Good job!" if radio==answer else f"Incorrect. The correct answer was {answer}."
|
| 81 |
scorebox = gr.Markdown(f"# Score: {score}")
|
| 82 |
|
| 83 |
return scorebox, output_column, results, input_column
|
|
@@ -90,9 +89,9 @@ with gr.Blocks() as demo:
|
|
| 90 |
with gr.Column():
|
| 91 |
scorebox = gr.Markdown(f"# Score: {score}")
|
| 92 |
image = gr.Image(f'./assets/{answer}.jpeg', label=answer, show_label= False)
|
| 93 |
-
radio = gr.Radio(choices=minPairGroup, label='Which word is pictured?', interactive=True)
|
| 94 |
|
| 95 |
with gr.Column(visible=True) as input_column:
|
|
|
|
| 96 |
submitButton = gr.Button("Submit")
|
| 97 |
|
| 98 |
with gr.Column(visible=False) as output_column:
|
|
|
|
| 76 |
updateScore(radio)
|
| 77 |
input_column = gr.Column(visible=False)
|
| 78 |
output_column = gr.Column(visible=True)
|
| 79 |
+
results = f"{minPairGroup} {answer} is correct. Good job!" if radio==answer else f"{minPairGroup} Incorrect. The correct answer was {answer}."
|
|
|
|
| 80 |
scorebox = gr.Markdown(f"# Score: {score}")
|
| 81 |
|
| 82 |
return scorebox, output_column, results, input_column
|
|
|
|
| 89 |
with gr.Column():
|
| 90 |
scorebox = gr.Markdown(f"# Score: {score}")
|
| 91 |
image = gr.Image(f'./assets/{answer}.jpeg', label=answer, show_label= False)
|
|
|
|
| 92 |
|
| 93 |
with gr.Column(visible=True) as input_column:
|
| 94 |
+
radio = gr.Radio(choices=minPairGroup, label='Which word is pictured?', interactive=True)
|
| 95 |
submitButton = gr.Button("Submit")
|
| 96 |
|
| 97 |
with gr.Column(visible=False) as output_column:
|