Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -107,8 +107,7 @@ with gr.Blocks() as demo:
|
|
| 107 |
ask_btn.click(fn=lambda t, d: generate_question(t, d),
|
| 108 |
inputs=[topic_input, difficulty_input],
|
| 109 |
outputs=question_output)
|
| 110 |
-
|
| 111 |
-
|
| 112 |
user_answer = gr.Textbox(label="你的回答", lines=3)
|
| 113 |
analyze_btn = gr.Button("📊 分析回答")
|
| 114 |
analysis_result = gr.Textbox(label="AI 分析與講解", lines=5)
|
|
@@ -116,6 +115,8 @@ with gr.Blocks() as demo:
|
|
| 116 |
inputs=[user_answer, question_output],
|
| 117 |
outputs=analysis_result)
|
| 118 |
|
|
|
|
|
|
|
| 119 |
gr.Markdown("---")
|
| 120 |
gr.Markdown("📅 查詢錯題紀錄")
|
| 121 |
date_input = gr.Textbox(label="輸入日期(YYYY-MM-DD)")
|
|
|
|
| 107 |
ask_btn.click(fn=lambda t, d: generate_question(t, d),
|
| 108 |
inputs=[topic_input, difficulty_input],
|
| 109 |
outputs=question_output)
|
| 110 |
+
|
|
|
|
| 111 |
user_answer = gr.Textbox(label="你的回答", lines=3)
|
| 112 |
analyze_btn = gr.Button("📊 分析回答")
|
| 113 |
analysis_result = gr.Textbox(label="AI 分析與講解", lines=5)
|
|
|
|
| 115 |
inputs=[user_answer, question_output],
|
| 116 |
outputs=analysis_result)
|
| 117 |
|
| 118 |
+
clear_btn.click(fn=clear_fields, outputs=[question_output, user_answer, analysis_result])
|
| 119 |
+
|
| 120 |
gr.Markdown("---")
|
| 121 |
gr.Markdown("📅 查詢錯題紀錄")
|
| 122 |
date_input = gr.Textbox(label="輸入日期(YYYY-MM-DD)")
|