youngtsai commited on
Commit
a652e8c
·
1 Parent(s): 5edf28f

, visible=False

Browse files
Files changed (1) hide show
  1. app.py +82 -82
app.py CHANGED
@@ -2668,90 +2668,90 @@ with gr.Blocks(theme=gr.themes.Base(primary_hue=gr.themes.colors.orange, seconda
2668
  with gr.Tab("關鍵時刻"):
2669
  with gr.Row():
2670
  key_moments_html = gr.HTML(value="")
2671
- # with gr.Tab("教學備課"):
2672
- # with gr.Row():
2673
- # content_subject = gr.Dropdown(label="選擇主題", choices=["數學", "自然", "國文", "英文", "社會","物理", "化學", "生物", "地理", "歷史", "公民"], value="", visible=False)
2674
- # content_grade = gr.Dropdown(label="選擇年級", choices=["一年級", "二年級", "三年級", "四年級", "五年級", "六年級", "七年級", "八年級", "九年級", "十年級", "十一年級", "十二年級"], value="", visible=False)
2675
- # content_level = gr.Dropdown(label="差異化教學", choices=["基礎", "中級", "進階"], value="基礎")
2676
- # with gr.Row():
2677
- # with gr.Tab("學習單"):
2678
- # with gr.Row():
2679
- # with gr.Column(scale=1):
2680
- # with gr.Row():
2681
- # worksheet_content_type_name = gr.Textbox(value="worksheet", visible=False)
2682
- # worksheet_algorithm = gr.Dropdown(label="選擇教學策略或理論", choices=["Bloom認知階層理論", "Polya數學解題法", "CRA教學法"], value="Bloom認知階層理論", visible=False)
2683
- # worksheet_content_btn = gr.Button("生成學習單 📄", variant="primary")
2684
- # with gr.Accordion("微調", open=False):
2685
- # worksheet_exam_result_fine_tune_prompt = gr.Textbox(label="根據結果,輸入你想更改的想法")
2686
- # worksheet_exam_result_fine_tune_btn = gr.Button("微調結果", variant="primary")
2687
- # worksheet_exam_result_retrun_original = gr.Button("返回原始結果")
2688
- # with gr.Accordion("prompt", open=False) as worksheet_accordion:
2689
- # worksheet_prompt = gr.Textbox(label="worksheet_prompt", show_copy_button=True, lines=40)
2690
- # with gr.Column(scale=2):
2691
- # # 生成對應不同模式的結果
2692
- # worksheet_exam_result_prompt = gr.Textbox(visible=False)
2693
- # worksheet_exam_result_original = gr.Textbox(visible=False)
2694
- # # worksheet_exam_result = gr.Textbox(label="初次生成結果", show_copy_button=True, interactive=True, lines=40)
2695
- # worksheet_exam_result = gr.Markdown(label="初次生成結果", latex_delimiters = [{"left": "$", "right": "$", "display": False}])
2696
- # worksheet_download_exam_result_button = gr.Button("轉成 word,完成後請點擊右下角 download 按鈕", variant="primary")
2697
- # worksheet_exam_result_word_link = gr.File(label="Download Word")
2698
- # with gr.Tab("教案"):
2699
- # with gr.Row():
2700
- # with gr.Column(scale=1):
2701
- # with gr.Row():
2702
- # lesson_plan_content_type_name = gr.Textbox(value="lesson_plan", visible=False)
2703
- # lesson_plan_time = gr.Slider(label="選擇課程時間(分鐘)", minimum=10, maximum=120, step=5, value=40)
2704
- # lesson_plan_btn = gr.Button("生成教案 📕", variant="primary")
2705
- # with gr.Accordion("微調", open=False):
2706
- # lesson_plan_exam_result_fine_tune_prompt = gr.Textbox(label="根據結果,輸入你想更改的想法")
2707
- # lesson_plan_exam_result_fine_tune_btn = gr.Button("微調結果", variant="primary")
2708
- # lesson_plan_exam_result_retrun_original = gr.Button("返回原始結果")
2709
- # with gr.Accordion("prompt", open=False) as lesson_plan_accordion:
2710
- # lesson_plan_prompt = gr.Textbox(label="worksheet_prompt", show_copy_button=True, lines=40)
2711
- # with gr.Column(scale=2):
2712
- # # 生成對應不同模式的結果
2713
- # lesson_plan_exam_result_prompt = gr.Textbox(visible=False)
2714
- # lesson_plan_exam_result_original = gr.Textbox(visible=False)
2715
- # lesson_plan_exam_result = gr.Markdown(label="初次生成結果", latex_delimiters = [{"left": "$", "right": "$", "display": False}])
2716
 
2717
- # lesson_plan_download_exam_result_button = gr.Button("轉成 word,完成後請點擊右下角 download 按鈕", variant="primary")
2718
- # lesson_plan_exam_result_word_link = gr.File(label="Download Word")
2719
- # with gr.Tab("出場券"):
2720
- # with gr.Row():
2721
- # with gr.Column(scale=1):
2722
- # with gr.Row():
2723
- # exit_ticket_content_type_name = gr.Textbox(value="exit_ticket", visible=False)
2724
- # exit_ticket_time = gr.Slider(label="選擇出場券時間(分鐘)", minimum=5, maximum=10, step=1, value=8)
2725
- # exit_ticket_btn = gr.Button("生成出場券 🎟️", variant="primary")
2726
- # with gr.Accordion("微調", open=False):
2727
- # exit_ticket_exam_result_fine_tune_prompt = gr.Textbox(label="根據結果,輸入你想更改的想法")
2728
- # exit_ticket_exam_result_fine_tune_btn = gr.Button("微調結果", variant="primary")
2729
- # exit_ticket_exam_result_retrun_original = gr.Button("返回原始結果")
2730
- # with gr.Accordion("prompt", open=False) as exit_ticket_accordion:
2731
- # exit_ticket_prompt = gr.Textbox(label="worksheet_prompt", show_copy_button=True, lines=40)
2732
- # with gr.Column(scale=2):
2733
- # # 生成對應不同模式的結果
2734
- # exit_ticket_exam_result_prompt = gr.Textbox(visible=False)
2735
- # exit_ticket_exam_result_original = gr.Textbox(visible=False)
2736
- # exit_ticket_exam_result = gr.Markdown(label="初次生成結果", latex_delimiters = [{"left": "$", "right": "$", "display": False}])
2737
 
2738
- # exit_ticket_download_exam_result_button = gr.Button("轉成 word,完成後請點擊右下角 download 按鈕", variant="primary")
2739
- # exit_ticket_exam_result_word_link = gr.File(label="Download Word")
2740
-
2741
-
2742
- # # with gr.Tab("素養導向閱讀題組"):
2743
- # # literacy_oriented_reading_content = gr.Textbox(label="輸入閱讀材料")
2744
- # # literacy_oriented_reading_content_btn = gr.Button("生成閱讀理解題")
2745
-
2746
- # # with gr.Tab("自我評估"):
2747
- # # self_assessment_content = gr.Textbox(label="輸入自評問卷或檢查表")
2748
- # # self_assessment_content_btn = gr.Button("生成自評問卷")
2749
- # # with gr.Tab("自我反思評量"):
2750
- # # self_reflection_content = gr.Textbox(label="輸入自我反思活動")
2751
- # # self_reflection_content_btn = gr.Button("生成自我反思活動")
2752
- # # with gr.Tab("後設認知"):
2753
- # # metacognition_content = gr.Textbox(label="輸入後設認知相關問題")
2754
- # # metacognition_content_btn = gr.Button("生成後設認知問題")
2755
 
2756
  with gr.Accordion("See Details", open=False) as see_details:
2757
  with gr.Tab("逐字稿本文"):
 
2668
  with gr.Tab("關鍵時刻"):
2669
  with gr.Row():
2670
  key_moments_html = gr.HTML(value="")
2671
+ with gr.Tab("教學備課"):
2672
+ with gr.Row():
2673
+ content_subject = gr.Dropdown(label="選擇主題", choices=["數學", "自然", "國文", "英文", "社會","物理", "化學", "生物", "地理", "歷史", "公民"], value="", visible=False)
2674
+ content_grade = gr.Dropdown(label="選擇年級", choices=["一年級", "二年級", "三年級", "四年級", "五年級", "六年級", "七年級", "八年級", "九年級", "十年級", "十一年級", "十二年級"], value="", visible=False)
2675
+ content_level = gr.Dropdown(label="差異化教學", choices=["基礎", "中級", "進階"], value="基礎")
2676
+ with gr.Row():
2677
+ with gr.Tab("學習單"):
2678
+ with gr.Row():
2679
+ with gr.Column(scale=1):
2680
+ with gr.Row():
2681
+ worksheet_content_type_name = gr.Textbox(value="worksheet", visible=False)
2682
+ worksheet_algorithm = gr.Dropdown(label="選擇教學策略或理論", choices=["Bloom認知階層理論", "Polya數學解題法", "CRA教學法"], value="Bloom認知階層理論", visible=False)
2683
+ worksheet_content_btn = gr.Button("生成學習單 📄", variant="primary", visible=False)
2684
+ with gr.Accordion("微調", open=False):
2685
+ worksheet_exam_result_fine_tune_prompt = gr.Textbox(label="根據結果,輸入你想更改的想法")
2686
+ worksheet_exam_result_fine_tune_btn = gr.Button("微調結果", variant="primary")
2687
+ worksheet_exam_result_retrun_original = gr.Button("返回原始結果")
2688
+ with gr.Accordion("prompt", open=False) as worksheet_accordion:
2689
+ worksheet_prompt = gr.Textbox(label="worksheet_prompt", show_copy_button=True, lines=40)
2690
+ with gr.Column(scale=2):
2691
+ # 生成對應不同模式的結果
2692
+ worksheet_exam_result_prompt = gr.Textbox(visible=False)
2693
+ worksheet_exam_result_original = gr.Textbox(visible=False)
2694
+ # worksheet_exam_result = gr.Textbox(label="初次生成結果", show_copy_button=True, interactive=True, lines=40)
2695
+ worksheet_exam_result = gr.Markdown(label="初次生成結果", latex_delimiters = [{"left": "$", "right": "$", "display": False}])
2696
+ worksheet_download_exam_result_button = gr.Button("轉成 word,完成後請點擊右下角 download 按鈕", variant="primary")
2697
+ worksheet_exam_result_word_link = gr.File(label="Download Word")
2698
+ with gr.Tab("教案"):
2699
+ with gr.Row():
2700
+ with gr.Column(scale=1):
2701
+ with gr.Row():
2702
+ lesson_plan_content_type_name = gr.Textbox(value="lesson_plan", visible=False)
2703
+ lesson_plan_time = gr.Slider(label="選擇課程時間(分鐘)", minimum=10, maximum=120, step=5, value=40)
2704
+ lesson_plan_btn = gr.Button("生成教案 📕", variant="primary", visible=False)
2705
+ with gr.Accordion("微調", open=False):
2706
+ lesson_plan_exam_result_fine_tune_prompt = gr.Textbox(label="根據結果,輸入你想更改的想法")
2707
+ lesson_plan_exam_result_fine_tune_btn = gr.Button("微調結果", variant="primary")
2708
+ lesson_plan_exam_result_retrun_original = gr.Button("返回原始結果")
2709
+ with gr.Accordion("prompt", open=False) as lesson_plan_accordion:
2710
+ lesson_plan_prompt = gr.Textbox(label="worksheet_prompt", show_copy_button=True, lines=40)
2711
+ with gr.Column(scale=2):
2712
+ # 生成對應不同模式的結果
2713
+ lesson_plan_exam_result_prompt = gr.Textbox(visible=False)
2714
+ lesson_plan_exam_result_original = gr.Textbox(visible=False)
2715
+ lesson_plan_exam_result = gr.Markdown(label="初次生成結果", latex_delimiters = [{"left": "$", "right": "$", "display": False}])
2716
 
2717
+ lesson_plan_download_exam_result_button = gr.Button("轉成 word,完成後請點擊右下角 download 按鈕", variant="primary")
2718
+ lesson_plan_exam_result_word_link = gr.File(label="Download Word")
2719
+ with gr.Tab("出場券"):
2720
+ with gr.Row():
2721
+ with gr.Column(scale=1):
2722
+ with gr.Row():
2723
+ exit_ticket_content_type_name = gr.Textbox(value="exit_ticket", visible=False)
2724
+ exit_ticket_time = gr.Slider(label="選擇出場券時間(分鐘)", minimum=5, maximum=10, step=1, value=8)
2725
+ exit_ticket_btn = gr.Button("生成出場券 🎟️", variant="primary", visible=False)
2726
+ with gr.Accordion("微調", open=False):
2727
+ exit_ticket_exam_result_fine_tune_prompt = gr.Textbox(label="根據結果,輸入你想更改的想法")
2728
+ exit_ticket_exam_result_fine_tune_btn = gr.Button("微調結果", variant="primary")
2729
+ exit_ticket_exam_result_retrun_original = gr.Button("返回原始結果")
2730
+ with gr.Accordion("prompt", open=False) as exit_ticket_accordion:
2731
+ exit_ticket_prompt = gr.Textbox(label="worksheet_prompt", show_copy_button=True, lines=40)
2732
+ with gr.Column(scale=2):
2733
+ # 生成對應不同模式的結果
2734
+ exit_ticket_exam_result_prompt = gr.Textbox(visible=False)
2735
+ exit_ticket_exam_result_original = gr.Textbox(visible=False)
2736
+ exit_ticket_exam_result = gr.Markdown(label="初次生成結果", latex_delimiters = [{"left": "$", "right": "$", "display": False}])
2737
 
2738
+ exit_ticket_download_exam_result_button = gr.Button("轉成 word,完成後請點擊右下角 download 按鈕", variant="primary")
2739
+ exit_ticket_exam_result_word_link = gr.File(label="Download Word")
2740
+
2741
+
2742
+ # with gr.Tab("素養導向閱讀題組"):
2743
+ # literacy_oriented_reading_content = gr.Textbox(label="輸入閱讀材料")
2744
+ # literacy_oriented_reading_content_btn = gr.Button("生成閱讀理解題")
2745
+
2746
+ # with gr.Tab("自我評估"):
2747
+ # self_assessment_content = gr.Textbox(label="輸入自評問卷或檢查表")
2748
+ # self_assessment_content_btn = gr.Button("生成自評問卷")
2749
+ # with gr.Tab("自我反思評量"):
2750
+ # self_reflection_content = gr.Textbox(label="輸入自我反思活動")
2751
+ # self_reflection_content_btn = gr.Button("生成自我反思活動")
2752
+ # with gr.Tab("後設認知"):
2753
+ # metacognition_content = gr.Textbox(label="輸入後設認知相關問題")
2754
+ # metacognition_content_btn = gr.Button("生成後設認知問題")
2755
 
2756
  with gr.Accordion("See Details", open=False) as see_details:
2757
  with gr.Tab("逐字稿本文"):