Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -260,7 +260,7 @@ Professor's Summary:
|
|
| 260 |
|
| 261 |
"""
|
| 262 |
|
| 263 |
-
BASE_PROMPT_TEMPLATE =
|
| 264 |
You are about to assume a role. Carefully review the persona, context, task, and output requirements before proceeding.
|
| 265 |
|
| 266 |
1. PERSONA
|
|
@@ -399,7 +399,7 @@ class GeminiGrader:
|
|
| 399 |
except Exception as e:
|
| 400 |
raise ValueError(f"Failed to configure Gemini API: {e}")
|
| 401 |
|
| 402 |
-
def grade_essay(self, essay_text: str, file_name: str) -> GradingResult:
|
| 403 |
"""
|
| 404 |
Sends the essay to Gemini for grading and parses the JSON response.
|
| 405 |
This is a synchronous method designed to be run in a thread pool.
|
|
|
|
| 260 |
|
| 261 |
"""
|
| 262 |
|
| 263 |
+
BASE_PROMPT_TEMPLATE = """
|
| 264 |
You are about to assume a role. Carefully review the persona, context, task, and output requirements before proceeding.
|
| 265 |
|
| 266 |
1. PERSONA
|
|
|
|
| 399 |
except Exception as e:
|
| 400 |
raise ValueError(f"Failed to configure Gemini API: {e}")
|
| 401 |
|
| 402 |
+
def grade_essay(self, essay_text: str, file_name: str, example_paper_text: str) -> GradingResult:
|
| 403 |
"""
|
| 404 |
Sends the essay to Gemini for grading and parses the JSON response.
|
| 405 |
This is a synchronous method designed to be run in a thread pool.
|