Spaces:
Sleeping
Sleeping
gr.Markdown("# Step 5.寫出完整段落")
Browse files
app.py
CHANGED
@@ -485,35 +485,57 @@ with gr.Blocks(theme=gr.themes.Soft(primary_hue=gr.themes.colors.blue, secondary
|
|
485 |
)
|
486 |
|
487 |
return topic_sentences_radio
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
488 |
|
489 |
|
490 |
|
491 |
|
492 |
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
gr.Markdown("## 5. Generate Supporting Sentence 支持句")
|
503 |
-
default_generate_supporting_sentences_prompt = """
|
504 |
-
I'm aiming to improve my writing. I have a topic sentence as topic_sentence_input.
|
505 |
-
Please assist me by "Developing supporting detials" based on the keyword: points to write three sentences as an example.
|
506 |
-
- Make sure any revised vocabulary aligns with the eng_level.
|
507 |
-
- Guidelines for Length and Complexity:
|
508 |
-
Please keep the example concise and straightforward,
|
509 |
-
avoiding overly technical language.
|
510 |
-
Total word-count is around 50. no more explanation either no more extra non-relation sentences.
|
511 |
-
"""
|
512 |
-
user_generate_supporting_sentences_prompt = gr.Textbox(label="Supporting Sentences Prompt", value=default_generate_supporting_sentences_prompt, visible=False)
|
513 |
-
generate_supporting_sentences_button = gr.Button("AI Generate Supporting Sentences")
|
514 |
-
supporting_sentences_output = gr.Textbox(label="AI Generated Supporting Sentences 支持句", show_copy_button=True)
|
515 |
-
supporting_sentences_input = gr.Textbox(label="Supporting Sentences")
|
516 |
-
|
517 |
gr.Markdown("## 6. Conclusion sentence 結論句")
|
518 |
default_generate_conclusion_sentence_prompt = """
|
519 |
I'm aiming to improve my writing.
|
|
|
485 |
)
|
486 |
|
487 |
return topic_sentences_radio
|
488 |
+
with gr.Row():
|
489 |
+
with gr.Column():
|
490 |
+
with gr.Row() as supporting_sentences_params:
|
491 |
+
default_generate_supporting_sentences_prompt = """
|
492 |
+
I'm aiming to improve my writing. I have a topic sentence as topic_sentence_input.
|
493 |
+
Please assist me by "Developing supporting detials" based on the keyword: points to write three sentences as an example.
|
494 |
+
- Make sure any revised vocabulary aligns with the eng_level.
|
495 |
+
- Guidelines for Length and Complexity:
|
496 |
+
Please keep the example concise and straightforward,
|
497 |
+
avoiding overly technical language.
|
498 |
+
Total word-count is around 50. no more explanation either no more extra non-relation sentences.
|
499 |
+
"""
|
500 |
+
user_generate_supporting_sentences_prompt = gr.Textbox(label="Supporting Sentences Prompt", value=default_generate_supporting_sentences_prompt, visible=False)
|
501 |
+
|
502 |
+
with gr.Row() as supporting_sentences_html:
|
503 |
+
gr.Markdown("# Step 5.寫出完整段落")
|
504 |
+
with gr.Row():
|
505 |
+
gr.Markdown("## 請根據主題句,練習寫出 「支持句」及「結論句」來完成一個完整的段落。")
|
506 |
+
with gr.Row():
|
507 |
+
with gr.Column():
|
508 |
+
gr.Markdown("### 支持句:以支持句來解釋要點,必要時舉例説明,來支持主題句。這些句子應該按照邏輯順序來組織,例如時間順序、空間順序、重要性順序、因果關係等。並使用轉折詞來引導讀者從一個 idea 到下一個 idea,讓讀者讀起來很順暢,不需反覆閱讀。")
|
509 |
+
with gr.Column():
|
510 |
+
with gr.Accordion("參考指引:撰寫支持句的方法?", open=False):
|
511 |
+
gr.Markdown("""
|
512 |
+
- Explanation 解釋説明:說明居住城市的優點,例如住在城市可享受便利的交通。
|
513 |
+
- Fact 陳述事實:説明運動可以增強心肺功能和肌肉力量,對於身體健康有正面影響。
|
514 |
+
- Cause and Effect 原因結果:解釋為何必須家事分工,例如家事分工更容易維護家庭環境的整齊清潔。
|
515 |
+
- Compare and Contrast 比較與對比:將主題與其他相關事物進行比較。例如比較傳統教學與線上學習。
|
516 |
+
- Incident 事件:利用事件來做説明。例如誤用表情符號造成困擾的事件,或葡式蛋塔風行的跟瘋事件。
|
517 |
+
- Evidence 提供證據:引用相關數據、研究或事實來佐證。例如全球互聯網用戶數已經突破了 50 億人,佔全球總人口近 65%。
|
518 |
+
- Example 舉例:舉自家為例,説明如何將家事的責任分配給每個家庭成員。
|
519 |
+
""")
|
520 |
+
with gr.Accordion("參考指引:針對要點的支持句,要寫幾句呢?", open=False):
|
521 |
+
gr.Markdown("""
|
522 |
+
- 一個要點,寫 3-6 句
|
523 |
+
- 兩個要點,每個要點寫 2-3 句
|
524 |
+
- 三個要點,每個要點寫 1-2 句
|
525 |
+
""")
|
526 |
+
with gr.Row():
|
527 |
+
with gr.Column():
|
528 |
+
gr.Markdown("### 寫出關於 focus 的支持句")
|
529 |
+
supporting_sentences_input = gr.Textbox(label="Supporting Sentences")
|
530 |
+
with gr.Column():
|
531 |
+
generate_supporting_sentences_button = gr.Button("AI Generate Supporting Sentences")
|
532 |
+
supporting_sentences_output = gr.Textbox(label="AI Generated Supporting Sentences 支持句", show_copy_button=True)
|
533 |
+
|
534 |
|
535 |
|
536 |
|
537 |
|
538 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
539 |
gr.Markdown("## 6. Conclusion sentence 結論句")
|
540 |
default_generate_conclusion_sentence_prompt = """
|
541 |
I'm aiming to improve my writing.
|