Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,7 +9,13 @@ from reportlab.lib.pagesizes import A4
|
|
| 9 |
genai.configure(api_key=os.getenv("GEMINI_API_KEY"))
|
| 10 |
|
| 11 |
# ---------- PROMPTS ----------
|
| 12 |
-
TRANSCRIPTION_PROMPT = """
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
GRADING_PROMPT = """ You are an official examiner. Grade the student transcription using the question paper and the official marking scheme. Rules: 1. Apply marks exactly as per the markscheme (M1, A1, etc.). 2. M marks must be earned before A marks. 3. Justify each awarded or withheld mark with clear reasoning. 4. Classify all errors as Conceptual Error, Silly Mistake, or None. 5. Follow dependency between M and A strictly. 6. Do not give marks outside the markscheme. Output must be a structured grading report with reasoning. """
|
| 14 |
|
| 15 |
# ---------- HELPER: Save to PDF ----------
|
|
|
|
| 9 |
genai.configure(api_key=os.getenv("GEMINI_API_KEY"))
|
| 10 |
|
| 11 |
# ---------- PROMPTS ----------
|
| 12 |
+
TRANSCRIPTION_PROMPT = """ Transcribe the PDF into a clean, question-wise format. While doing so, ensure the following:
|
| 13 |
+
|
| 14 |
+
Exclude any text that has been cut, striked, or crossed out (since these may represent student mistakes).
|
| 15 |
+
|
| 16 |
+
Clearly distinguish between a "step cut" and when variables cancel out during a step.
|
| 17 |
+
|
| 18 |
+
Present the transcription neatly without including unnecessary markings. """
|
| 19 |
GRADING_PROMPT = """ You are an official examiner. Grade the student transcription using the question paper and the official marking scheme. Rules: 1. Apply marks exactly as per the markscheme (M1, A1, etc.). 2. M marks must be earned before A marks. 3. Justify each awarded or withheld mark with clear reasoning. 4. Classify all errors as Conceptual Error, Silly Mistake, or None. 5. Follow dependency between M and A strictly. 6. Do not give marks outside the markscheme. Output must be a structured grading report with reasoning. """
|
| 20 |
|
| 21 |
# ---------- HELPER: Save to PDF ----------
|