Spaces:
Sleeping
Sleeping
paragraph_output_download = gr.File(label="下載段落草稿")
Browse files
app.py
CHANGED
@@ -1317,9 +1317,12 @@ with gr.Blocks(theme=gr.themes.Soft(primary_hue=gr.themes.colors.blue, secondary
|
|
1317 |
- 最後,段落應該有一個結論句,總結主要觀點,強化所要傳遞的資訊。
|
1318 |
""")
|
1319 |
with gr.Row():
|
1320 |
-
generate_paragraph_button = gr.Button("
|
1321 |
with gr.Row():
|
1322 |
-
|
|
|
|
|
|
|
1323 |
|
1324 |
generate_paragraph_button.click(
|
1325 |
fn=show_elements,
|
@@ -1333,6 +1336,10 @@ with gr.Blocks(theme=gr.themes.Soft(primary_hue=gr.themes.colors.blue, secondary
|
|
1333 |
conclusion_sentence_input
|
1334 |
],
|
1335 |
outputs=paragraph_output
|
|
|
|
|
|
|
|
|
1336 |
)
|
1337 |
with gr.Row(visible=False) as paragraph_evaluate_params:
|
1338 |
default_user_generate_paragraph_evaluate_prompt = """
|
|
|
1317 |
- 最後,段落應該有一個結論句,總結主要觀點,強化所要傳遞的資訊。
|
1318 |
""")
|
1319 |
with gr.Row():
|
1320 |
+
generate_paragraph_button = gr.Button("請點擊此按鈕,合併已填寫的句子為草稿,供閱讀、下載及修訂", variant="primary")
|
1321 |
with gr.Row():
|
1322 |
+
with gr.Column():
|
1323 |
+
paragraph_output = gr.Textbox(label="完整段落", show_copy_button=True)
|
1324 |
+
with gr.Column():
|
1325 |
+
paragraph_output_download = gr.File(label="下載段落草稿")
|
1326 |
|
1327 |
generate_paragraph_button.click(
|
1328 |
fn=show_elements,
|
|
|
1336 |
conclusion_sentence_input
|
1337 |
],
|
1338 |
outputs=paragraph_output
|
1339 |
+
).then(
|
1340 |
+
fn=download_content,
|
1341 |
+
inputs=[paragraph_output],
|
1342 |
+
outputs=[paragraph_output_download]
|
1343 |
)
|
1344 |
with gr.Row(visible=False) as paragraph_evaluate_params:
|
1345 |
default_user_generate_paragraph_evaluate_prompt = """
|