youngtsai commited on
Commit
140a695
·
1 Parent(s): 169fbfd

generate_paragraph_button = gr.Button("閱讀並修訂草稿", variant="primary")

Browse files
Files changed (1) hide show
  1. app.py +7 -10
app.py CHANGED
@@ -633,9 +633,9 @@ with gr.Blocks(theme=gr.themes.Soft(primary_hue=gr.themes.colors.blue, secondary
633
  - 最後,段落應該有一個結論句,總結主要觀點,強化所要傳遞的資訊。
634
  """)
635
  with gr.Row():
636
- generate_paragraph_button = gr.Button("Generate Paragraph", variant="primary")
637
  with gr.Row():
638
- paragraph_output = gr.Textbox(label="Generated Paragraph 完整段落", show_copy_button=True)
639
 
640
  generate_paragraph_button.click(
641
  fn=generate_paragraph,
@@ -647,12 +647,7 @@ with gr.Blocks(theme=gr.themes.Soft(primary_hue=gr.themes.colors.blue, secondary
647
  outputs=paragraph_output
648
  )
649
 
650
-
651
- with gr.Row():
652
- with gr.Column():
653
- with gr.Row():
654
- gr.Markdown("## 8. Evaluate 分析")
655
- with gr.Row():
656
  default_user_generate_paragraph_evaluate_prompt = """
657
  Based on the final paragraph provided, evaluate the writing in terms of content, organization, grammar, and vocabulary. Provide feedback in simple and supportive language.
658
 
@@ -734,8 +729,10 @@ with gr.Blocks(theme=gr.themes.Soft(primary_hue=gr.themes.colors.blue, secondary
734
  }}
735
  """
736
  user_generate_paragraph_evaluate_prompt = gr.Textbox(label="Paragraph evaluate Prompt", value=default_user_generate_paragraph_evaluate_prompt, visible=False)
737
- generate_paragraph_evaluate_button = gr.Button("Save and Evaluate")
738
- paragraph_evaluate_output = gr.Textbox(label="Generated Paragraph evaluate 完整段落分析", show_copy_button=True)
 
 
739
 
740
  gr.Markdown("## 9. Correct Grammatical and Spelling Errors 修訂文法與拼字錯誤")
741
  default_user_correct_grammatical_spelling_errors_prompt = """
 
633
  - 最後,段落應該有一個結論句,總結主要觀點,強化所要傳遞的資訊。
634
  """)
635
  with gr.Row():
636
+ generate_paragraph_button = gr.Button("閱讀並修訂草稿", variant="primary")
637
  with gr.Row():
638
+ paragraph_output = gr.Textbox(label="完整段落", show_copy_button=True)
639
 
640
  generate_paragraph_button.click(
641
  fn=generate_paragraph,
 
647
  outputs=paragraph_output
648
  )
649
 
650
+ with gr.Row() as paragraph_evaluate_params:
 
 
 
 
 
651
  default_user_generate_paragraph_evaluate_prompt = """
652
  Based on the final paragraph provided, evaluate the writing in terms of content, organization, grammar, and vocabulary. Provide feedback in simple and supportive language.
653
 
 
729
  }}
730
  """
731
  user_generate_paragraph_evaluate_prompt = gr.Textbox(label="Paragraph evaluate Prompt", value=default_user_generate_paragraph_evaluate_prompt, visible=False)
732
+ with gr.Row():
733
+ generate_paragraph_evaluate_button = gr.Button("段落分析", variant="primary")
734
+ with gr.Row():
735
+ paragraph_evaluate_output = gr.Textbox(label="完整段落分析")
736
 
737
  gr.Markdown("## 9. Correct Grammatical and Spelling Errors 修訂文法與拼字錯誤")
738
  default_user_correct_grammatical_spelling_errors_prompt = """