Spaces:
Sleeping
Sleeping
with gr.Accordion("prompt 提供微調測試", open=False, elem_classes=['accordion-prompts']):
Browse files
app.py
CHANGED
@@ -475,8 +475,14 @@ def update_exam_contents(selected_title):
|
|
475 |
if exam["title"] == selected_title:
|
476 |
return exam["title"], exam["question"], exam["hint"], exam["image_url"]
|
477 |
|
478 |
-
|
479 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
480 |
# ===== 英文段落寫作練習 =====
|
481 |
with gr.Tab(label="英文段落寫作練習"):
|
482 |
# basic inputs 主題與情境
|
@@ -1504,7 +1510,7 @@ with gr.Blocks(theme=gr.themes.Soft(primary_hue=gr.themes.colors.blue, secondary
|
|
1504 |
past_exam_correct_grammatical_spelling_errors_input = gr.Textbox(label="這是你的原始寫作內容,參考 JUTOR 的建議,你可以選擇是否修改:",lines= 10, show_copy_button=True)
|
1505 |
with gr.Column():
|
1506 |
with gr.Row():
|
1507 |
-
with gr.Accordion("prompt 提供微調測試", open=False):
|
1508 |
past_exam_correct_grammatical_spelling_errors_prompt = gr.Textbox(label="Correct Grammatical and Spelling Errors Prompt", value=default_user_correct_grammatical_spelling_errors_prompt, lines= 20)
|
1509 |
with gr.Row():
|
1510 |
past_exam_generate_correct_grammatical_spelling_errors_button = gr.Button("JUTOR 修訂", variant="primary")
|
@@ -1523,7 +1529,7 @@ with gr.Blocks(theme=gr.themes.Soft(primary_hue=gr.themes.colors.blue, secondary
|
|
1523 |
past_exam_refine_input = gr.Textbox(label="這是你的原始寫作內容,參考 JUTOR 的建議,你可以選擇是否修改:", show_copy_button=True,lines= 10)
|
1524 |
with gr.Column():
|
1525 |
with gr.Row():
|
1526 |
-
with gr.Accordion("prompt 提供微調測試", open=False):
|
1527 |
past_exam_refine_paragraph_prompt = gr.Textbox(label="Refine Paragraph Prompt", value=default_user_refine_paragraph_prompt, lines= 20)
|
1528 |
with gr.Row():
|
1529 |
past_exam_generate_refine_button = gr.Button("段落改善建議", variant="primary")
|
|
|
475 |
if exam["title"] == selected_title:
|
476 |
return exam["title"], exam["question"], exam["hint"], exam["image_url"]
|
477 |
|
478 |
+
# elem_classes=['accordion-prompts']
|
479 |
+
CSS = """
|
480 |
+
.accordion-prompts {
|
481 |
+
background-color: orange;
|
482 |
+
}
|
483 |
+
"""
|
484 |
+
|
485 |
+
with gr.Blocks(theme=gr.themes.Soft(primary_hue=gr.themes.colors.blue, secondary_hue=gr.themes.colors.orange), css=CSS) as demo:
|
486 |
# ===== 英文段落寫作練習 =====
|
487 |
with gr.Tab(label="英文段落寫作練習"):
|
488 |
# basic inputs 主題與情境
|
|
|
1510 |
past_exam_correct_grammatical_spelling_errors_input = gr.Textbox(label="這是你的原始寫作內容,參考 JUTOR 的建議,你可以選擇是否修改:",lines= 10, show_copy_button=True)
|
1511 |
with gr.Column():
|
1512 |
with gr.Row():
|
1513 |
+
with gr.Accordion("prompt 提供微調測試", open=False, elem_classes=['accordion-prompts']):
|
1514 |
past_exam_correct_grammatical_spelling_errors_prompt = gr.Textbox(label="Correct Grammatical and Spelling Errors Prompt", value=default_user_correct_grammatical_spelling_errors_prompt, lines= 20)
|
1515 |
with gr.Row():
|
1516 |
past_exam_generate_correct_grammatical_spelling_errors_button = gr.Button("JUTOR 修訂", variant="primary")
|
|
|
1529 |
past_exam_refine_input = gr.Textbox(label="這是你的原始寫作內容,參考 JUTOR 的建議,你可以選擇是否修改:", show_copy_button=True,lines= 10)
|
1530 |
with gr.Column():
|
1531 |
with gr.Row():
|
1532 |
+
with gr.Accordion("prompt 提供微調測試", open=False, elem_classes=['accordion-prompts']):
|
1533 |
past_exam_refine_paragraph_prompt = gr.Textbox(label="Refine Paragraph Prompt", value=default_user_refine_paragraph_prompt, lines= 20)
|
1534 |
with gr.Row():
|
1535 |
past_exam_generate_refine_button = gr.Button("段落改善建議", variant="primary")
|