Spaces:
Runtime error
Runtime error
Merge branch 'main' of https://github.com/opendilab/LLMRiddles
Browse files27 unmodified lines28293031323311 unmodified lines45464748495021 unmodified lines727374757677788 unmodified lines87888990919293949527 unmodified linescorrect_label = "正确"wrong_label = "错误"api_error_info = "请在提交问题之前先输入你的 API Key"elif _LANG == "en":requirement_ph = 'Click \'Next\' to Start'requirement_label = "Requirements"11 unmodified linescorrect_label = "Correct"wrong_label = "Wrong"api_error_info = "Please Enter API Key Before Submitting Question."else:raise KeyError("invalid _LANG: {}".format(_LANG))21 unmodified lineswith gr.Column():gr_api_key = gr.Text(placeholder=api_ph, label=api_label, type='password',visible=_need_api_key())gr_uuid = gr.Text(value='')gr_predict = gr.Label(label=predict_label)gr_explanation = gr.TextArea(label=explanation_label)gr_next = gr.Button(next_label)8 unmodified lines_QUESTION_IDS[uuid_] = _qidif _qid >= len(_QUESTIONS):return game_cleared_label, '', '', {}, '', \gr.Button(submit_label, interactive=False), \gr.Button(next_label, interactive=False), uuid_else:executor = QuestionExecutor(_QUESTIONS[_qid], _LANG)return executor.question_text, '', '', {}, '', \27 unmodified lines2829303132333411 unmodified lines4647484950515221 unmodified lines747576777879808 unmodified lines899091929394959697989927 unmodified linescorrect_label = "正确"wrong_label = "错误"api_error_info = "请在提交问题之前先输入你的 API Key"try_again_label = "再玩一次"elif _LANG == "en":requirement_ph = 'Click \'Next\' to Start'requirement_label = "Requirements"11 unmodified linescorrect_label = "Correct"wrong_label = "Wrong"api_error_info = "Please Enter API Key Before Submitting Question."try_again_label = "Try Again"else:raise KeyError("invalid _LANG: {}".format(_LANG))21 unmodified lineswith gr.Column():gr_api_key = gr.Text(placeholder=api_ph, label=api_label, type='password',visible=_need_api_key())gr_uuid = gr.Text(value='', visible=False)gr_predict = gr.Label(label=predict_label)gr_explanation = gr.TextArea(label=explanation_label)gr_next = gr.Button(next_label)8 unmodified lines_QUESTION_IDS[uuid_] = _qidif _qid >= len(_QUESTIONS):del _QUESTION_IDS[uuid_]return game_cleared_label, '', '', {}, '', \gr.Button(submit_label, interactive=False), \gr.Button(try_again_label, interactive=True), \''else:executor = QuestionExecutor(_QUESTIONS[_qid], _LANG)return executor.question_text, '', '', {}, '', \
app.py+6-2