Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -142,6 +142,7 @@ if not os.path.exists(excel_file):
|
|
| 142 |
'PHQ-9 Score', 'GAD-7 Score'
|
| 143 |
]).to_excel(excel_file, index=False, engine="openpyxl")
|
| 144 |
|
|
|
|
| 145 |
# Same for the pickle file:
|
| 146 |
if not os.path.exists(pickle_file):
|
| 147 |
pd.DataFrame(columns=[
|
|
@@ -374,7 +375,9 @@ def process_gad7(*scores):
|
|
| 374 |
return "Your combined score exceeds the threshold. You do not meet the inclusion criteria."
|
| 375 |
else:
|
| 376 |
app_state["eligible"] = True
|
| 377 |
-
|
|
|
|
|
|
|
| 378 |
# We append these columns to the same Excel used for other scenario data:
|
| 379 |
save_to_excel({
|
| 380 |
"Prolific ID": app_state["prolific_id"],
|
|
|
|
| 142 |
'PHQ-9 Score', 'GAD-7 Score'
|
| 143 |
]).to_excel(excel_file, index=False, engine="openpyxl")
|
| 144 |
|
| 145 |
+
|
| 146 |
# Same for the pickle file:
|
| 147 |
if not os.path.exists(pickle_file):
|
| 148 |
pd.DataFrame(columns=[
|
|
|
|
| 375 |
return "Your combined score exceeds the threshold. You do not meet the inclusion criteria."
|
| 376 |
else:
|
| 377 |
app_state["eligible"] = True
|
| 378 |
+
print("New row data being saved:", new_row)
|
| 379 |
+
print("App state before saving:", app_state)
|
| 380 |
+
|
| 381 |
# We append these columns to the same Excel used for other scenario data:
|
| 382 |
save_to_excel({
|
| 383 |
"Prolific ID": app_state["prolific_id"],
|