Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,7 +8,7 @@ DEEPSEEK_BASE_URL = os.getenv("DEEPSEEK_BASE_URL", "https://api.deepseek.com/v1"
|
|
| 8 |
DEEPSEEK_MODEL = os.getenv("DEEPSEEK_MODEL", "deepseek-chat") # <-- public model id
|
| 9 |
|
| 10 |
OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
|
| 11 |
-
OPENAI_MODEL = os.getenv("OPENAI_MODEL", "gpt-
|
| 12 |
|
| 13 |
# ==================== Google Sheets config ====================
|
| 14 |
SVC_JSON = os.getenv("GOOGLE_SERVICE_ACCOUNT_JSON") # whole JSON as a single string
|
|
@@ -31,7 +31,7 @@ Step 2: Scoring rules.
|
|
| 31 |
1) Comprehension – 1 to 5 stars (how accurately the student captured the story or message).
|
| 32 |
2) Expression – 1 to 5 stars (clarity, coherence, fluency; how understandable if narrated).
|
| 33 |
3) Reflection/Moral Takeaway – 1 to 5 stars (thoughtfulness, personal connection).
|
| 34 |
-
4) Grammar (lenient): Identify grammar/spelling/punctuation mistakes in the student's text. Ignore minor conversational-English slips.
|
| 35 |
Return a list of issues where each item contains:
|
| 36 |
- "error_excerpt": student's exact snippet with the mistake (max ~120 chars)
|
| 37 |
- "correction": corrected version of that snippet
|
|
|
|
| 8 |
DEEPSEEK_MODEL = os.getenv("DEEPSEEK_MODEL", "deepseek-chat") # <-- public model id
|
| 9 |
|
| 10 |
OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
|
| 11 |
+
OPENAI_MODEL = os.getenv("OPENAI_MODEL", "gpt-5") # faster fallback than gpt-5
|
| 12 |
|
| 13 |
# ==================== Google Sheets config ====================
|
| 14 |
SVC_JSON = os.getenv("GOOGLE_SERVICE_ACCOUNT_JSON") # whole JSON as a single string
|
|
|
|
| 31 |
1) Comprehension – 1 to 5 stars (how accurately the student captured the story or message).
|
| 32 |
2) Expression – 1 to 5 stars (clarity, coherence, fluency; how understandable if narrated).
|
| 33 |
3) Reflection/Moral Takeaway – 1 to 5 stars (thoughtfulness, personal connection).
|
| 34 |
+
4) Grammar (lenient): Identify grammar/spelling/punctuation mistakes in the student's text. Ignore minor conversational-English slips.Ignore spacing issues totally
|
| 35 |
Return a list of issues where each item contains:
|
| 36 |
- "error_excerpt": student's exact snippet with the mistake (max ~120 chars)
|
| 37 |
- "correction": corrected version of that snippet
|