Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -117,11 +117,9 @@ def perform_ocr_file(file_obj: Any) -> Tuple[str, str, Dict[str, str]]:
|
|
117 |
file_content = f.read()
|
118 |
|
119 |
logger.info(f"Uploading PDF {file_name} to Mistral...")
|
120 |
-
files = {
|
121 |
-
"file": (file_name, file_content, "application/pdf")
|
122 |
-
}
|
123 |
uploaded_pdf = client.files.upload(
|
124 |
-
file=
|
|
|
125 |
purpose="ocr"
|
126 |
)
|
127 |
uploaded_file_id = uploaded_pdf.id
|
|
|
117 |
file_content = f.read()
|
118 |
|
119 |
logger.info(f"Uploading PDF {file_name} to Mistral...")
|
|
|
|
|
|
|
120 |
uploaded_pdf = client.files.upload(
|
121 |
+
file=file_content,
|
122 |
+
filename=file_name,
|
123 |
purpose="ocr"
|
124 |
)
|
125 |
uploaded_file_id = uploaded_pdf.id
|