Update app.py
Browse files
app.py
CHANGED
@@ -5,8 +5,8 @@ import json
|
|
5 |
json_data = """
|
6 |
{
|
7 |
"questions": [
|
8 |
-
{"text": "
|
9 |
-
{"text": "
|
10 |
]
|
11 |
}
|
12 |
"""
|
@@ -42,7 +42,7 @@ with gr.Blocks(css=css, theme='YTheme/TehnoX') as vui:
|
|
42 |
for i, question in enumerate(data['questions'], start=1):
|
43 |
with gr.Row():
|
44 |
with gr.Column():
|
45 |
-
radio = gr.Radio(label=f"Вопрос {i}", choices=["
|
46 |
question_blocks.append(radio)
|
47 |
|
48 |
text_button = gr.Button("Проверить", variant='primary')
|
|
|
5 |
json_data = """
|
6 |
{
|
7 |
"questions": [
|
8 |
+
{"text": "5+5=10", "correct_answer": "Верно", "wrong_answer_text": "Неправильно. Правильный ответ: А"},
|
9 |
+
{"text": "9+1=11", "correct_answer": "Не верно", "wrong_answer_text": "Неправильно. Правильный ответ: Б"}
|
10 |
]
|
11 |
}
|
12 |
"""
|
|
|
42 |
for i, question in enumerate(data['questions'], start=1):
|
43 |
with gr.Row():
|
44 |
with gr.Column():
|
45 |
+
radio = gr.Radio(label=f"Вопрос {i}", choices=["Верно", "Не верно"], info=question['text'])
|
46 |
question_blocks.append(radio)
|
47 |
|
48 |
text_button = gr.Button("Проверить", variant='primary')
|