Spaces:
Sleeping
Sleeping
sabareesh4317 commited on
Commit ·
0c78c26
1
Parent(s): 2f8c924
Increase processing timeout and fix error handling
Browse files- backend/main.py +5 -5
- backend/processor.py +1 -1
backend/main.py
CHANGED
|
@@ -64,11 +64,11 @@ class ProcessingResponse(BaseModel):
|
|
| 64 |
success: bool
|
| 65 |
processing_id: str
|
| 66 |
timestamp: str
|
| 67 |
-
processing_time_seconds: float
|
| 68 |
-
raw_text: str
|
| 69 |
-
prescription_data: Dict[str, Any]
|
| 70 |
-
summary: str
|
| 71 |
-
confidence: Dict[str, float]
|
| 72 |
exports: Optional[Dict[str, Any]] = None
|
| 73 |
error: Optional[str] = None
|
| 74 |
|
|
|
|
| 64 |
success: bool
|
| 65 |
processing_id: str
|
| 66 |
timestamp: str
|
| 67 |
+
processing_time_seconds: Optional[float] = 0.0
|
| 68 |
+
raw_text: Optional[str] = ""
|
| 69 |
+
prescription_data: Optional[Dict[str, Any]] = {}
|
| 70 |
+
summary: Optional[str] = ""
|
| 71 |
+
confidence: Optional[Dict[str, float]] = {}
|
| 72 |
exports: Optional[Dict[str, Any]] = None
|
| 73 |
error: Optional[str] = None
|
| 74 |
|
backend/processor.py
CHANGED
|
@@ -72,7 +72,7 @@ class PrescriptionProcessor:
|
|
| 72 |
'output_dir': 'outputs',
|
| 73 |
'enable_history': True,
|
| 74 |
'ocr_confidence_threshold': 0.3,
|
| 75 |
-
'processing_timeout':
|
| 76 |
}
|
| 77 |
|
| 78 |
def _setup_logging(self):
|
|
|
|
| 72 |
'output_dir': 'outputs',
|
| 73 |
'enable_history': True,
|
| 74 |
'ocr_confidence_threshold': 0.3,
|
| 75 |
+
'processing_timeout': 300,
|
| 76 |
}
|
| 77 |
|
| 78 |
def _setup_logging(self):
|