Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -118,7 +118,7 @@ def document_loader(temperature,max_tokens,api_key,model_name,file_path):
|
|
118 |
print("Converted text {}\nNum Pages;{}".format(converted_txt,num_pages))
|
119 |
|
120 |
elif file_path.endswith('.jpg') or file_path.endswith('.jpeg'):
|
121 |
-
conversion_stats = convert_image_to_pdf(file_path,
|
122 |
converted_txt = conversion_stats["converted_text"]
|
123 |
num_pages = conversion_stats["num_pages"]
|
124 |
was_truncated = conversion_stats["truncated"]
|
|
|
118 |
print("Converted text {}\nNum Pages;{}".format(converted_txt,num_pages))
|
119 |
|
120 |
elif file_path.endswith('.jpg') or file_path.endswith('.jpeg'):
|
121 |
+
conversion_stats = convert_image_to_pdf(file_path,ocr_model)
|
122 |
converted_txt = conversion_stats["converted_text"]
|
123 |
num_pages = conversion_stats["num_pages"]
|
124 |
was_truncated = conversion_stats["truncated"]
|