Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -173,8 +173,8 @@ def parse_latex_output(res):
|
|
| 173 |
|
| 174 |
return '$$\\$$\n'.join(parsed_lines)
|
| 175 |
|
| 176 |
-
def ocr_demo(image, task, ocr_type, ocr_box, ocr_color):
|
| 177 |
-
res, html_content, unique_id = process_image(image, task, ocr_type, ocr_box, ocr_color)
|
| 178 |
|
| 179 |
if isinstance(res, str) and res.startswith("Error:"):
|
| 180 |
return res, None
|
|
|
|
| 173 |
|
| 174 |
return '$$\\$$\n'.join(parsed_lines)
|
| 175 |
|
| 176 |
+
def ocr_demo(image, task, ocr_type, ocr_box, ocr_color, max_new_tokens, no_repeat_ngram_size):
|
| 177 |
+
res, html_content, unique_id = process_image(image, task, max_new_tokens, no_repeat_ngram_size, ocr_type, ocr_box, ocr_color)
|
| 178 |
|
| 179 |
if isinstance(res, str) and res.startswith("Error:"):
|
| 180 |
return res, None
|