Spaces:
Sleeping
Sleeping
with gr.Blocks(theme=gr.themes.Base(primary_hue=gr.themes.colors.orange, secondary_hue=gr.themes.colors.amber)) as demo:
Browse files
app.py
CHANGED
@@ -1645,7 +1645,7 @@ HEAD = """
|
|
1645 |
"""
|
1646 |
|
1647 |
|
1648 |
-
with gr.Blocks() as demo:
|
1649 |
with gr.Row() as admin:
|
1650 |
password = gr.Textbox(label="Password", type="password", elem_id="password_input", visible=True)
|
1651 |
file_upload = gr.File(label="Upload your CSV or Word file", visible=False)
|
@@ -1667,7 +1667,7 @@ with gr.Blocks() as demo:
|
|
1667 |
btn_1 = gr.Button()
|
1668 |
btn_2 = gr.Button()
|
1669 |
btn_3 = gr.Button()
|
1670 |
-
gr.Markdown("## 重新生成問題")
|
1671 |
btn_create_question = gr.Button("Create Questions")
|
1672 |
|
1673 |
with gr.Accordion("See Details", open=False):
|
@@ -1698,17 +1698,17 @@ with gr.Blocks() as demo:
|
|
1698 |
socratic_mode_btn = gr.Checkbox(label="蘇格拉底家教助理模式", value=True)
|
1699 |
openai_chatbot_audio_input = gr.Audio(sources=["microphone"], type="filepath")
|
1700 |
msg = gr.Textbox(label="Message")
|
1701 |
-
send_button = gr.Button("Send")
|
1702 |
with gr.Tab("GROQ"):
|
1703 |
gr.Markdown("## GROQ 模式")
|
1704 |
groq_chatbot = gr.Chatbot(label="groq mode chatbot")
|
1705 |
groq_msg = gr.Textbox(label="Message")
|
1706 |
-
groq_send_button = gr.Button("Send")
|
1707 |
with gr.Tab("JUTOR"):
|
1708 |
gr.Markdown("## JUTOR API 模式")
|
1709 |
jutor_chatbot = gr.Chatbot(label="jutor mode chatbot")
|
1710 |
jutor_msg = gr.Textbox(label="Message")
|
1711 |
-
jutor_send_button = gr.Button("Send")
|
1712 |
|
1713 |
with gr.Tab("教師版"):
|
1714 |
with gr.Row():
|
@@ -1719,12 +1719,13 @@ with gr.Blocks() as demo:
|
|
1719 |
with gr.Tab("學習單"):
|
1720 |
with gr.Row():
|
1721 |
with gr.Column(scale=1):
|
1722 |
-
|
1723 |
-
|
1724 |
-
|
|
|
1725 |
with gr.Accordion("微調", open=False):
|
1726 |
worksheet_exam_result_fine_tune_prompt = gr.Textbox(label="根據結果,輸入你想更改的想法")
|
1727 |
-
worksheet_exam_result_fine_tune_btn = gr.Button("微調結果")
|
1728 |
worksheet_exam_result_retrun_original = gr.Button("返回原始結果")
|
1729 |
with gr.Accordion("prompt", open=False):
|
1730 |
worksheet_prompt = gr.Textbox(label="worksheet_prompt", show_copy_button=True, lines=40)
|
@@ -1733,18 +1734,19 @@ with gr.Blocks() as demo:
|
|
1733 |
worksheet_exam_result_prompt = gr.Textbox(visible=False)
|
1734 |
worksheet_exam_result_original = gr.Textbox(visible=False)
|
1735 |
worksheet_exam_result = gr.Textbox(label="初次生成結果", show_copy_button=True, interactive=True, lines=40)
|
1736 |
-
worksheet_download_exam_result_button = gr.Button("將结果轉成 word,完成後請點擊右下角 download 按鈕")
|
1737 |
worksheet_exam_result_word_link = gr.File(label="Download Word")
|
1738 |
|
1739 |
with gr.Tab("課程計畫"):
|
1740 |
with gr.Row():
|
1741 |
with gr.Column(scale=1):
|
1742 |
-
|
1743 |
-
|
1744 |
-
|
|
|
1745 |
with gr.Accordion("微調", open=False):
|
1746 |
lesson_plan_exam_result_fine_tune_prompt = gr.Textbox(label="根據結果,輸入你想更改的想法")
|
1747 |
-
lesson_plan_exam_result_fine_tune_btn = gr.Button("微調結果")
|
1748 |
lesson_plan_exam_result_retrun_original = gr.Button("返回原始結果")
|
1749 |
with gr.Accordion("prompt", open=False):
|
1750 |
lesson_plan_prompt = gr.Textbox(label="worksheet_prompt", show_copy_button=True, lines=40)
|
@@ -1754,18 +1756,19 @@ with gr.Blocks() as demo:
|
|
1754 |
lesson_plan_exam_result_original = gr.Textbox(visible=False)
|
1755 |
lesson_plan_exam_result = gr.Textbox(label="初次生成結果", show_copy_button=True, interactive=True, lines=40)
|
1756 |
|
1757 |
-
lesson_plan_download_exam_result_button = gr.Button("將结果轉成 word,完成後請點擊右下角 download 按鈕")
|
1758 |
lesson_plan_exam_result_word_link = gr.File(label="Download Word")
|
1759 |
|
1760 |
with gr.Tab("出場券"):
|
1761 |
with gr.Row():
|
1762 |
with gr.Column(scale=1):
|
1763 |
-
|
1764 |
-
|
1765 |
-
|
|
|
1766 |
with gr.Accordion("微調", open=False):
|
1767 |
exit_ticket_exam_result_fine_tune_prompt = gr.Textbox(label="根據結果,輸入你想更改的想法")
|
1768 |
-
exit_ticket_exam_result_fine_tune_btn = gr.Button("微調結果")
|
1769 |
exit_ticket_exam_result_retrun_original = gr.Button("返回原始結果")
|
1770 |
with gr.Accordion("prompt", open=False):
|
1771 |
exit_ticket_prompt = gr.Textbox(label="worksheet_prompt", show_copy_button=True, lines=40)
|
@@ -1775,7 +1778,7 @@ with gr.Blocks() as demo:
|
|
1775 |
exit_ticket_exam_result_original = gr.Textbox(visible=False)
|
1776 |
exit_ticket_exam_result = gr.Textbox(label="初次生成結果", show_copy_button=True, interactive=True, lines=40)
|
1777 |
|
1778 |
-
exit_ticket_download_exam_result_button = gr.Button("將结果轉成 word,完成後請點擊右下角 download 按鈕")
|
1779 |
exit_ticket_exam_result_word_link = gr.File(label="Download Word")
|
1780 |
|
1781 |
|
|
|
1645 |
"""
|
1646 |
|
1647 |
|
1648 |
+
with gr.Blocks(theme=gr.themes.Base(primary_hue=gr.themes.colors.orange, secondary_hue=gr.themes.colors.amber)) as demo:
|
1649 |
with gr.Row() as admin:
|
1650 |
password = gr.Textbox(label="Password", type="password", elem_id="password_input", visible=True)
|
1651 |
file_upload = gr.File(label="Upload your CSV or Word file", visible=False)
|
|
|
1667 |
btn_1 = gr.Button()
|
1668 |
btn_2 = gr.Button()
|
1669 |
btn_3 = gr.Button()
|
1670 |
+
gr.Markdown("## 重新生成問題", variant="primary")
|
1671 |
btn_create_question = gr.Button("Create Questions")
|
1672 |
|
1673 |
with gr.Accordion("See Details", open=False):
|
|
|
1698 |
socratic_mode_btn = gr.Checkbox(label="蘇格拉底家教助理模式", value=True)
|
1699 |
openai_chatbot_audio_input = gr.Audio(sources=["microphone"], type="filepath")
|
1700 |
msg = gr.Textbox(label="Message")
|
1701 |
+
send_button = gr.Button("Send", variant="primary")
|
1702 |
with gr.Tab("GROQ"):
|
1703 |
gr.Markdown("## GROQ 模式")
|
1704 |
groq_chatbot = gr.Chatbot(label="groq mode chatbot")
|
1705 |
groq_msg = gr.Textbox(label="Message")
|
1706 |
+
groq_send_button = gr.Button("Send", variant="primary")
|
1707 |
with gr.Tab("JUTOR"):
|
1708 |
gr.Markdown("## JUTOR API 模式")
|
1709 |
jutor_chatbot = gr.Chatbot(label="jutor mode chatbot")
|
1710 |
jutor_msg = gr.Textbox(label="Message")
|
1711 |
+
jutor_send_button = gr.Button("Send", variant="primary")
|
1712 |
|
1713 |
with gr.Tab("教師版"):
|
1714 |
with gr.Row():
|
|
|
1719 |
with gr.Tab("學習單"):
|
1720 |
with gr.Row():
|
1721 |
with gr.Column(scale=1):
|
1722 |
+
with gr.Row():
|
1723 |
+
worksheet_content_type_name = gr.Textbox(value="worksheet", visible=False)
|
1724 |
+
worksheet_algorithm = gr.Dropdown(label="選擇教學策略或理論", choices=["Bloom認知階層理論", "Polya數學解題法", "CRA教學法"], value="Bloom認知階層理論", visible=False)
|
1725 |
+
worksheet_content_btn = gr.Button("生成學習單 📄", variant="primary")
|
1726 |
with gr.Accordion("微調", open=False):
|
1727 |
worksheet_exam_result_fine_tune_prompt = gr.Textbox(label="根據結果,輸入你想更改的想法")
|
1728 |
+
worksheet_exam_result_fine_tune_btn = gr.Button("微調結果", variant="primary")
|
1729 |
worksheet_exam_result_retrun_original = gr.Button("返回原始結果")
|
1730 |
with gr.Accordion("prompt", open=False):
|
1731 |
worksheet_prompt = gr.Textbox(label="worksheet_prompt", show_copy_button=True, lines=40)
|
|
|
1734 |
worksheet_exam_result_prompt = gr.Textbox(visible=False)
|
1735 |
worksheet_exam_result_original = gr.Textbox(visible=False)
|
1736 |
worksheet_exam_result = gr.Textbox(label="初次生成結果", show_copy_button=True, interactive=True, lines=40)
|
1737 |
+
worksheet_download_exam_result_button = gr.Button("將结果轉成 word,完成後請點擊右下角 download 按鈕", variant="primary")
|
1738 |
worksheet_exam_result_word_link = gr.File(label="Download Word")
|
1739 |
|
1740 |
with gr.Tab("課程計畫"):
|
1741 |
with gr.Row():
|
1742 |
with gr.Column(scale=1):
|
1743 |
+
with gr.Row():
|
1744 |
+
lesson_plan_content_type_name = gr.Textbox(value="lesson_plan", visible=False)
|
1745 |
+
lesson_plan_time = gr.Slider(label="選擇課程時間(分鐘)", minimum=10, maximum=120, step=5, value=40)
|
1746 |
+
lesson_plan_btn = gr.Button("生成課程計畫 📕", variant="primary")
|
1747 |
with gr.Accordion("微調", open=False):
|
1748 |
lesson_plan_exam_result_fine_tune_prompt = gr.Textbox(label="根據結果,輸入你想更改的想法")
|
1749 |
+
lesson_plan_exam_result_fine_tune_btn = gr.Button("微調結果", variant="primary")
|
1750 |
lesson_plan_exam_result_retrun_original = gr.Button("返回原始結果")
|
1751 |
with gr.Accordion("prompt", open=False):
|
1752 |
lesson_plan_prompt = gr.Textbox(label="worksheet_prompt", show_copy_button=True, lines=40)
|
|
|
1756 |
lesson_plan_exam_result_original = gr.Textbox(visible=False)
|
1757 |
lesson_plan_exam_result = gr.Textbox(label="初次生成結果", show_copy_button=True, interactive=True, lines=40)
|
1758 |
|
1759 |
+
lesson_plan_download_exam_result_button = gr.Button("將结果轉成 word,完成後請點擊右下角 download 按鈕", variant="primary")
|
1760 |
lesson_plan_exam_result_word_link = gr.File(label="Download Word")
|
1761 |
|
1762 |
with gr.Tab("出場券"):
|
1763 |
with gr.Row():
|
1764 |
with gr.Column(scale=1):
|
1765 |
+
with gr.Row():
|
1766 |
+
exit_ticket_content_type_name = gr.Textbox(value="exit_ticket", visible=False)
|
1767 |
+
exit_ticket_time = gr.Slider(label="選擇出場券時間(分鐘)", minimum=5, maximum=10, step=1, value=8)
|
1768 |
+
exit_ticket_btn = gr.Button("生成出場券 🎟️", variant="primary")
|
1769 |
with gr.Accordion("微調", open=False):
|
1770 |
exit_ticket_exam_result_fine_tune_prompt = gr.Textbox(label="根據結果,輸入你想更改的想法")
|
1771 |
+
exit_ticket_exam_result_fine_tune_btn = gr.Button("微調結果", variant="primary")
|
1772 |
exit_ticket_exam_result_retrun_original = gr.Button("返回原始結果")
|
1773 |
with gr.Accordion("prompt", open=False):
|
1774 |
exit_ticket_prompt = gr.Textbox(label="worksheet_prompt", show_copy_button=True, lines=40)
|
|
|
1778 |
exit_ticket_exam_result_original = gr.Textbox(visible=False)
|
1779 |
exit_ticket_exam_result = gr.Textbox(label="初次生成結果", show_copy_button=True, interactive=True, lines=40)
|
1780 |
|
1781 |
+
exit_ticket_download_exam_result_button = gr.Button("將结果轉成 word,完成後請點擊右下角 download 按鈕", variant="primary")
|
1782 |
exit_ticket_exam_result_word_link = gr.File(label="Download Word")
|
1783 |
|
1784 |
|