Spaces:
Sleeping
Sleeping
paragraph_evaluate_output
Browse files
app.py
CHANGED
@@ -267,8 +267,8 @@ with gr.Blocks() as demo:
|
|
267 |
paragraph_output = gr.Textbox(label="Generated Paragraph 完整段落")
|
268 |
paragraph_input = gr.Textbox(label="Paragraph")
|
269 |
|
270 |
-
gr.Markdown("## 8.
|
271 |
-
|
272 |
Based on the final paragraph provided, evaluate the writing in terms of content, organization, grammar, and vocabulary. Provide feedback in simple and supportive language.
|
273 |
|
274 |
-- 根據上述的文章,以「內容(content)」層面評分。
|
@@ -315,9 +315,9 @@ with gr.Blocks() as demo:
|
|
315 |
“coherence_and_cohesion“: {coherence_and_cohesion dict}
|
316 |
}}
|
317 |
"""
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
|
322 |
generate_topics_button.click(
|
323 |
fn=generate_topics,
|
@@ -403,4 +403,13 @@ with gr.Blocks() as demo:
|
|
403 |
outputs=paragraph_output
|
404 |
)
|
405 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
406 |
demo.launch()
|
|
|
267 |
paragraph_output = gr.Textbox(label="Generated Paragraph 完整段落")
|
268 |
paragraph_input = gr.Textbox(label="Paragraph")
|
269 |
|
270 |
+
gr.Markdown("## 8. evaluate 分析")
|
271 |
+
default_user_generate_paragraph_evaluate_prompt = """
|
272 |
Based on the final paragraph provided, evaluate the writing in terms of content, organization, grammar, and vocabulary. Provide feedback in simple and supportive language.
|
273 |
|
274 |
-- 根據上述的文章,以「內容(content)」層面評分。
|
|
|
315 |
“coherence_and_cohesion“: {coherence_and_cohesion dict}
|
316 |
}}
|
317 |
"""
|
318 |
+
user_generate_paragraph_evaluate_prompt = gr.Textbox(label="Paragraph evaluate Prompt", value=default_user_generate_paragraph_evaluate_prompt)
|
319 |
+
generate_paragraph_evaluate_button = gr.Button("Save and Evaluate")
|
320 |
+
paragraph_evaluate_output = gr.Textbox(label="Generated Paragraph evaluate 完整段落分析")
|
321 |
|
322 |
generate_topics_button.click(
|
323 |
fn=generate_topics,
|
|
|
403 |
outputs=paragraph_output
|
404 |
)
|
405 |
|
406 |
+
generate_paragraph_evaluate_button.click(
|
407 |
+
fn=generate_paragraph_evaluate,
|
408 |
+
inputs=[
|
409 |
+
paragraph_input,
|
410 |
+
user_generate_paragraph_evaluate_prompt
|
411 |
+
],
|
412 |
+
outputs=paragraph_evaluate_output
|
413 |
+
)
|
414 |
+
|
415 |
demo.launch()
|