Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -126,14 +126,14 @@ def run_ocr_and_extract(image, temperature=0.2, extraction_mode="Regex"):
|
|
| 126 |
processed_img = image
|
| 127 |
|
| 128 |
# processed_img = preprocess_image_for_ocr(image)
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
inputs = processor.apply_chat_template(
|
| 138 |
chat,
|
| 139 |
add_generation_prompt=True,
|
|
|
|
| 126 |
processed_img = image
|
| 127 |
|
| 128 |
# processed_img = preprocess_image_for_ocr(image)
|
| 129 |
+
chat = [
|
| 130 |
+
{
|
| 131 |
+
"role": "user",
|
| 132 |
+
"content": [
|
| 133 |
+
{"type": "image", "image": processed_img}
|
| 134 |
+
],
|
| 135 |
+
}
|
| 136 |
+
]
|
| 137 |
inputs = processor.apply_chat_template(
|
| 138 |
chat,
|
| 139 |
add_generation_prompt=True,
|