Spaces:
Running
Running
Commit
·
49d27ca
1
Parent(s):
117842d
fix: add `no-det-res.jpg` to replace 'None' (which cause error when caching examples)
Browse files- app.py +2 -2
- docs/no-det-res.jpg +0 -0
app.py
CHANGED
|
@@ -104,10 +104,10 @@ def recognize(
|
|
| 104 |
return only_text, str(OUTPUT_RESULT_DIR / out_det_fp)
|
| 105 |
elif rec_type == 'formula':
|
| 106 |
only_text = p2t.recognize_formula(image_file)
|
| 107 |
-
return latex_render(only_text),
|
| 108 |
elif rec_type == 'text':
|
| 109 |
only_text = p2t.recognize_text(image_file)
|
| 110 |
-
return only_text,
|
| 111 |
|
| 112 |
|
| 113 |
def example_func(lang_list, rec_type, image_file):
|
|
|
|
| 104 |
return only_text, str(OUTPUT_RESULT_DIR / out_det_fp)
|
| 105 |
elif rec_type == 'formula':
|
| 106 |
only_text = p2t.recognize_formula(image_file)
|
| 107 |
+
return latex_render(only_text), './docs/no-det-res.jpg'
|
| 108 |
elif rec_type == 'text':
|
| 109 |
only_text = p2t.recognize_text(image_file)
|
| 110 |
+
return only_text, './docs/no-det-res.jpg'
|
| 111 |
|
| 112 |
|
| 113 |
def example_func(lang_list, rec_type, image_file):
|
docs/no-det-res.jpg
ADDED
|