Spaces:
Sleeping
Sleeping
Update routers/inference.py
Browse files- routers/inference.py +7 -1
routers/inference.py
CHANGED
@@ -8,6 +8,12 @@ import utils
|
|
8 |
import os
|
9 |
import json
|
10 |
from routers.donut_inference import process_document_donut
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
|
12 |
|
13 |
router = APIRouter()
|
@@ -29,7 +35,7 @@ def count_values(obj):
|
|
29 |
|
30 |
@router.post("/inference")
|
31 |
async def run_inference(file: Optional[UploadFile] = File(None), image_url: Optional[str] = Form(None),
|
32 |
-
model_in_use: str = Form('donut'), shipper_id: Optional[str] = Form(
|
33 |
):
|
34 |
|
35 |
|
|
|
8 |
import os
|
9 |
import json
|
10 |
from routers.donut_inference import process_document_donut
|
11 |
+
import logging
|
12 |
+
import io
|
13 |
+
|
14 |
+
# Set up logging
|
15 |
+
logging.basicConfig(level=logging.INFO)
|
16 |
+
logger = logging.getLogger(__name__)
|
17 |
|
18 |
|
19 |
router = APIRouter()
|
|
|
35 |
|
36 |
@router.post("/inference")
|
37 |
async def run_inference(file: Optional[UploadFile] = File(None), image_url: Optional[str] = Form(None),
|
38 |
+
model_in_use: str = Form('donut'), shipper_id: Optional[str] = Form(default_shipper)
|
39 |
):
|
40 |
|
41 |
|