Spaces:
Sleeping
Sleeping
dinhquangson
commited on
Commit
•
5746b0c
1
Parent(s):
44f21ae
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ from datasets import load_dataset
|
|
4 |
from fastapi.middleware.cors import CORSMiddleware
|
5 |
import pdfplumber
|
6 |
import pytesseract
|
7 |
-
from models import
|
8 |
|
9 |
# Loading
|
10 |
import os
|
@@ -335,7 +335,7 @@ async def convert_upload_file(file: UploadFile = File(...)):
|
|
335 |
top_p=0.9,
|
336 |
response_format=ChatCompletionResponseFormat(
|
337 |
type="json_object",
|
338 |
-
schema=
|
339 |
),
|
340 |
)
|
341 |
|
|
|
4 |
from fastapi.middleware.cors import CORSMiddleware
|
5 |
import pdfplumber
|
6 |
import pytesseract
|
7 |
+
from models import Invoice
|
8 |
|
9 |
# Loading
|
10 |
import os
|
|
|
335 |
top_p=0.9,
|
336 |
response_format=ChatCompletionResponseFormat(
|
337 |
type="json_object",
|
338 |
+
schema=Invoice.model_json_schema(),
|
339 |
),
|
340 |
)
|
341 |
|