Spaces:
Runtime error
Runtime error
dev(hansbug): fix okay
Browse files
app.py
CHANGED
@@ -35,7 +35,7 @@ if __name__ == '__main__':
|
|
35 |
with gr.Column():
|
36 |
gr_api_key = gr.Text(placeholder='Your API Key', label='API Key', type='password',
|
37 |
visible=_need_api_key())
|
38 |
-
gr_uuid = gr.Text(value='')
|
39 |
gr_predict = gr.Label(label='Correctness')
|
40 |
gr_explanation = gr.TextArea(label='Explanation')
|
41 |
gr_next = gr.Button('Next')
|
@@ -51,10 +51,11 @@ if __name__ == '__main__':
|
|
51 |
print(_QUESTION_IDS)
|
52 |
|
53 |
if _qid >= len(_QUESTIONS):
|
|
|
54 |
return 'Congratulations!', '', '', {}, '', \
|
55 |
gr.Button('Submit', interactive=False), \
|
56 |
-
gr.Button('
|
57 |
-
|
58 |
else:
|
59 |
executor = QuestionExecutor(_QUESTIONS[_qid], _LANG)
|
60 |
return executor.question_text, '', '', {}, '', \
|
|
|
35 |
with gr.Column():
|
36 |
gr_api_key = gr.Text(placeholder='Your API Key', label='API Key', type='password',
|
37 |
visible=_need_api_key())
|
38 |
+
gr_uuid = gr.Text(value='', visible=False)
|
39 |
gr_predict = gr.Label(label='Correctness')
|
40 |
gr_explanation = gr.TextArea(label='Explanation')
|
41 |
gr_next = gr.Button('Next')
|
|
|
51 |
print(_QUESTION_IDS)
|
52 |
|
53 |
if _qid >= len(_QUESTIONS):
|
54 |
+
del _QUESTION_IDS[uuid_]
|
55 |
return 'Congratulations!', '', '', {}, '', \
|
56 |
gr.Button('Submit', interactive=False), \
|
57 |
+
gr.Button('Try Again', interactive=True), \
|
58 |
+
''
|
59 |
else:
|
60 |
executor = QuestionExecutor(_QUESTIONS[_qid], _LANG)
|
61 |
return executor.question_text, '', '', {}, '', \
|