Spaces:
Running
Running
akhil-vaidya
commited on
Commit
•
d96edb1
1
Parent(s):
7316288
optimization
Browse files
app.py
CHANGED
@@ -108,7 +108,7 @@ def get_text(image_file, model, tokenizer):
|
|
108 |
st.title("Image - Text OCR")
|
109 |
st.write("Upload an image for OCR")
|
110 |
|
111 |
-
|
112 |
random_value = random.randint(0, 100)
|
113 |
st.write(f"Model loaded: build number - {random_value}")
|
114 |
|
@@ -127,8 +127,8 @@ if image_file:
|
|
127 |
# model, tokenizer = init_model()
|
128 |
# text = get_text(image_file, model, tokenizer)
|
129 |
|
130 |
-
model, processor = init_llama()
|
131 |
-
text = get_llama_op(image_file,
|
132 |
|
133 |
# model, processor = init_qwen_model()
|
134 |
# text = get_quen_op(image_file, model, processor)
|
|
|
108 |
st.title("Image - Text OCR")
|
109 |
st.write("Upload an image for OCR")
|
110 |
|
111 |
+
MODEL, PROCESSOR = init_llama()
|
112 |
random_value = random.randint(0, 100)
|
113 |
st.write(f"Model loaded: build number - {random_value}")
|
114 |
|
|
|
127 |
# model, tokenizer = init_model()
|
128 |
# text = get_text(image_file, model, tokenizer)
|
129 |
|
130 |
+
# model, processor = init_llama()
|
131 |
+
text = get_llama_op(image_file, MODEL, PROCESSOR)
|
132 |
|
133 |
# model, processor = init_qwen_model()
|
134 |
# text = get_quen_op(image_file, model, processor)
|