Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -39,8 +39,8 @@ def stress_detection_app():
|
|
| 39 |
|
| 40 |
# Store the prediction in Supabase
|
| 41 |
user_id = st.session_state.get("user_id", "anonymous") # Fallback to "anonymous" if no user_id
|
| 42 |
-
timestamp = datetime.datetime.now().
|
| 43 |
-
|
| 44 |
response = supabase.table("predictions").insert({
|
| 45 |
"user_id": user_id,
|
| 46 |
"prediction": prediction,
|
|
|
|
| 39 |
|
| 40 |
# Store the prediction in Supabase
|
| 41 |
user_id = st.session_state.get("user_id", "anonymous") # Fallback to "anonymous" if no user_id
|
| 42 |
+
timestamp = int(datetime.datetime.now().timestamp()) # Convert to Unix epoch time (integer)
|
| 43 |
+
|
| 44 |
response = supabase.table("predictions").insert({
|
| 45 |
"user_id": user_id,
|
| 46 |
"prediction": prediction,
|