Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
|
@@ -98,7 +98,10 @@ LEAVE_TYPES = ["annual", "sick", "maternity", "paternity", "unpaid", "study", "c
|
|
| 98 |
LEAVE_STATUSES = ["pending", "approved", "declined", "cancelled"]
|
| 99 |
MEETING_STATUSES = ["scheduled", "in_progress", "completed", "cancelled"]
|
| 100 |
EXPENSE_STATUSES = ["pending", "approved", "flagged", "rejected"]
|
| 101 |
-
SUBMISSION_WEEK_FORMAT = "%
|
|
|
|
|
|
|
|
|
|
| 102 |
|
| 103 |
|
| 104 |
# =============================================================================
|
|
@@ -131,7 +134,7 @@ try:
|
|
| 131 |
raise ValueError("'Gemini' env var not set.")
|
| 132 |
from google import genai
|
| 133 |
gemini_client = genai.Client(api_key=_gemini_key)
|
| 134 |
-
MODEL_NAME = "gemini-
|
| 135 |
logger.info(f"Gemini initialized ({MODEL_NAME}).")
|
| 136 |
except Exception as e:
|
| 137 |
logger.critical(f"FATAL Gemini init: {e}")
|
|
|
|
| 98 |
LEAVE_STATUSES = ["pending", "approved", "declined", "cancelled"]
|
| 99 |
MEETING_STATUSES = ["scheduled", "in_progress", "completed", "cancelled"]
|
| 100 |
EXPENSE_STATUSES = ["pending", "approved", "flagged", "rejected"]
|
| 101 |
+
SUBMISSION_WEEK_FORMAT = "%G-W%V" # ISO 8601 week: %G = ISO year, %V = ISO week number (Mon-based)
|
| 102 |
+
# Matches TypeScript's getISOWeek() output exactly e.g. "2026-W21"
|
| 103 |
+
# %W (old value) was Monday-based week-of-year per Python locale,
|
| 104 |
+
# which diverges from ISO by 1 on most dates — fixed here.
|
| 105 |
|
| 106 |
|
| 107 |
# =============================================================================
|
|
|
|
| 134 |
raise ValueError("'Gemini' env var not set.")
|
| 135 |
from google import genai
|
| 136 |
gemini_client = genai.Client(api_key=_gemini_key)
|
| 137 |
+
MODEL_NAME = "gemini-3.1-flash-lite"
|
| 138 |
logger.info(f"Gemini initialized ({MODEL_NAME}).")
|
| 139 |
except Exception as e:
|
| 140 |
logger.critical(f"FATAL Gemini init: {e}")
|