Spaces:
Sleeping
Sleeping
Commit
·
9968fb2
1
Parent(s):
d85a4e0
not cache model hash
Browse files
app.py
CHANGED
@@ -72,8 +72,8 @@ def get_quen_op(image_file, model, processor):
|
|
72 |
return f"An error occurred: {str(e)}"
|
73 |
|
74 |
@st.cache_data
|
75 |
-
def get_text(image_file,
|
76 |
-
res =
|
77 |
return res
|
78 |
|
79 |
def highlight_text(text, search_term):
|
|
|
72 |
return f"An error occurred: {str(e)}"
|
73 |
|
74 |
@st.cache_data
|
75 |
+
def get_text(image_file, _model, tokenizer):
|
76 |
+
res = _model.chat(tokenizer, image_file, ocr_type='ocr')
|
77 |
return res
|
78 |
|
79 |
def highlight_text(text, search_term):
|