Spaces:
Sleeping
Sleeping
Rajan Sharma
commited on
Update app.py
Browse files
app.py
CHANGED
|
@@ -198,7 +198,11 @@ def handle_healthcare_scenario(scenario_text, data_registry, history):
|
|
| 198 |
return response
|
| 199 |
except Exception as e:
|
| 200 |
log_event("healthcare_scenario_error", None, {"error": str(e)})
|
| 201 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 202 |
|
| 203 |
# ---------- Model loading helpers ----------
|
| 204 |
def pick_dtype_and_map():
|
|
|
|
| 198 |
return response
|
| 199 |
except Exception as e:
|
| 200 |
log_event("healthcare_scenario_error", None, {"error": str(e)})
|
| 201 |
+
# Log the full traceback for better debugging
|
| 202 |
+
import traceback
|
| 203 |
+
tb_str = traceback.format_exc()
|
| 204 |
+
log_event("healthcare_scenario_traceback", None, {"traceback": tb_str})
|
| 205 |
+
return f"Error analyzing healthcare scenario: {str(e)}\n\nTechnical details:\n{tb_str}"
|
| 206 |
|
| 207 |
# ---------- Model loading helpers ----------
|
| 208 |
def pick_dtype_and_map():
|