Spaces:
Sleeping
Sleeping
worksheet_content_btn.click(
Browse files
app.py
CHANGED
@@ -1687,24 +1687,49 @@ with gr.Blocks() as demo:
|
|
1687 |
|
1688 |
worksheet_download_exam_result_button = gr.Button("下载结果")
|
1689 |
worksheet_exam_result_word_link = gr.File(label="Download Word")
|
1690 |
-
|
1691 |
-
|
1692 |
with gr.Tab("課程計畫"):
|
1693 |
-
|
1694 |
-
|
1695 |
-
|
1696 |
-
|
1697 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1698 |
with gr.Tab("出場券"):
|
1699 |
-
|
1700 |
-
|
1701 |
-
|
1702 |
-
|
1703 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1704 |
|
1705 |
-
with gr.Tab("素養導向閱讀題組"):
|
1706 |
-
|
1707 |
-
|
1708 |
|
1709 |
# with gr.Tab("自我評估"):
|
1710 |
# self_assessment_content = gr.Textbox(label="輸入自評問卷或檢查表")
|
@@ -1818,17 +1843,17 @@ with gr.Blocks() as demo:
|
|
1818 |
worksheet_content_btn.click(
|
1819 |
on_generate_ai_content,
|
1820 |
inputs=[password, df_string_output, content_topic, content_grade, content_level, worksheet_algorithm, worksheet_content_type_name],
|
1821 |
-
outputs=[
|
1822 |
)
|
1823 |
lesson_plan_btn.click(
|
1824 |
on_generate_ai_content,
|
1825 |
inputs=[password, df_string_output, content_topic, content_grade, content_level, lesson_plan_time, lesson_plan_content_type_name],
|
1826 |
-
outputs=[
|
1827 |
)
|
1828 |
exit_ticket_btn.click(
|
1829 |
on_generate_ai_content,
|
1830 |
inputs=[password, df_string_output, content_topic, content_grade, content_level, exit_ticket_time, exit_ticket_content_type_name],
|
1831 |
-
outputs=[
|
1832 |
)
|
1833 |
|
1834 |
# 生成結果微調
|
|
|
1687 |
|
1688 |
worksheet_download_exam_result_button = gr.Button("下载结果")
|
1689 |
worksheet_exam_result_word_link = gr.File(label="Download Word")
|
1690 |
+
|
|
|
1691 |
with gr.Tab("課程計畫"):
|
1692 |
+
with gr.Row():
|
1693 |
+
with gr.Column(scale=1):
|
1694 |
+
lesson_plan_content_type_name = gr.Textbox(value="lesson_plan", visible=False)
|
1695 |
+
lesson_plan_time = gr.Slider(label="選擇課程時間(分鐘)", minimum=10, maximum=120, step=5, value=40)
|
1696 |
+
lesson_plan_btn = gr.Button("生成課程計畫 📕")
|
1697 |
+
with gr.Accordion("prompt", open=False):
|
1698 |
+
lesson_plan_prompt = gr.Textbox(label="worksheet_prompt", show_copy_button=True, lines=40)
|
1699 |
+
with gr.Column(scale=2):
|
1700 |
+
# 生成對應不同模式的結果
|
1701 |
+
lesson_plan_exam_result_prompt = gr.Textbox(visible=False)
|
1702 |
+
lesson_plan_exam_result = gr.Textbox(label="初次生成結果", show_copy_button=True, interactive=True)
|
1703 |
+
lesson_plan_exam_result_fine_tune_prompt = gr.Textbox(label="根據結果,輸入你想更改的想法")
|
1704 |
+
lesson_plan_exam_result_fine_tune_btn = gr.Button("微調結果")
|
1705 |
+
lesson_plan_exam_result_fine_result = gr.Textbox(label="微調結果",show_copy_button=True)
|
1706 |
+
|
1707 |
+
lesson_plan_download_exam_result_button = gr.Button("下载结果")
|
1708 |
+
lesson_plan_exam_result_word_link = gr.File(label="Download Word")
|
1709 |
+
|
1710 |
with gr.Tab("出場券"):
|
1711 |
+
with gr.Row():
|
1712 |
+
with gr.Column(scale=1):
|
1713 |
+
exit_ticket_content_type_name = gr.Textbox(value="exit_ticket", visible=False)
|
1714 |
+
exit_ticket_time = gr.Slider(label="選擇出場券時間(分鐘)", minimum=5, maximum=10, step=1, value=8)
|
1715 |
+
exit_ticket_btn = gr.Button("生成出場券 🎟️")
|
1716 |
+
with gr.Accordion("prompt", open=False):
|
1717 |
+
exit_ticket_prompt = gr.Textbox(label="worksheet_prompt", show_copy_button=True, lines=40)
|
1718 |
+
with gr.Column(scale=2):
|
1719 |
+
# 生成對應不同模式的結果
|
1720 |
+
exit_ticket_exam_result_prompt = gr.Textbox(visible=False)
|
1721 |
+
exit_ticket_exam_result = gr.Textbox(label="初次生成結果", show_copy_button=True, interactive=True)
|
1722 |
+
exit_ticket_exam_result_fine_tune_prompt = gr.Textbox(label="根據結果,輸入你想更改的想法")
|
1723 |
+
exit_ticket_exam_result_fine_tune_btn = gr.Button("微調結果")
|
1724 |
+
exit_ticket_exam_result_fine_result = gr.Textbox(label="微調結果",show_copy_button=True)
|
1725 |
+
|
1726 |
+
exit_ticket_download_exam_result_button = gr.Button("下载结果")
|
1727 |
+
exit_ticket_exam_result_word_link = gr.File(label="Download Word")
|
1728 |
+
|
1729 |
|
1730 |
+
# with gr.Tab("素養導向閱讀題組"):
|
1731 |
+
# literacy_oriented_reading_content = gr.Textbox(label="輸入閱讀材料")
|
1732 |
+
# literacy_oriented_reading_content_btn = gr.Button("生成閱讀理解題")
|
1733 |
|
1734 |
# with gr.Tab("自我評估"):
|
1735 |
# self_assessment_content = gr.Textbox(label="輸入自評問卷或檢查表")
|
|
|
1843 |
worksheet_content_btn.click(
|
1844 |
on_generate_ai_content,
|
1845 |
inputs=[password, df_string_output, content_topic, content_grade, content_level, worksheet_algorithm, worksheet_content_type_name],
|
1846 |
+
outputs=[worksheet_exam_result, worksheet_prompt, worksheet_exam_result_prompt]
|
1847 |
)
|
1848 |
lesson_plan_btn.click(
|
1849 |
on_generate_ai_content,
|
1850 |
inputs=[password, df_string_output, content_topic, content_grade, content_level, lesson_plan_time, lesson_plan_content_type_name],
|
1851 |
+
outputs=[lesson_plan_exam_result, lesson_plan_prompt, lesson_plan_exam_result_prompt]
|
1852 |
)
|
1853 |
exit_ticket_btn.click(
|
1854 |
on_generate_ai_content,
|
1855 |
inputs=[password, df_string_output, content_topic, content_grade, content_level, exit_ticket_time, exit_ticket_content_type_name],
|
1856 |
+
outputs=[exit_ticket_exam_result, exit_ticket_prompt, exit_ticket_exam_result_prompt]
|
1857 |
)
|
1858 |
|
1859 |
# 生成結果微調
|