Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,8 +14,9 @@ def evaluate_essay(title, essay):
|
|
| 14 |
Essay: {essay}
|
| 15 |
Please generate a detailed evaluation based on the rubric provided above.
|
| 16 |
"""
|
| 17 |
-
|
| 18 |
-
|
|
|
|
| 19 |
|
| 20 |
# 使用 Gradio 構建界面
|
| 21 |
title_input = gr.Textbox(label="Essay Title")
|
|
|
|
| 14 |
Essay: {essay}
|
| 15 |
Please generate a detailed evaluation based on the rubric provided above.
|
| 16 |
"""
|
| 17 |
+
# 使用 text_generation 方法進行推理
|
| 18 |
+
response = inference.text_generation(input_text)
|
| 19 |
+
return response[0]["generated_text"] if "generated_text" in response[0] else "No evaluation available."
|
| 20 |
|
| 21 |
# 使用 Gradio 構建界面
|
| 22 |
title_input = gr.Textbox(label="Essay Title")
|