Update app.py
Browse files
app.py
CHANGED
@@ -3,6 +3,7 @@ from PIL import Image
|
|
3 |
import streamlit as st
|
4 |
# Load model directly
|
5 |
from transformers import AutoTokenizer, AutoModelForImageTextToText
|
|
|
6 |
|
7 |
tokenizer = AutoTokenizer.from_pretrained("microsoft/trocr-large-printed")
|
8 |
model = AutoModelForImageTextToText.from_pretrained("microsoft/trocr-large-printed")
|
|
|
3 |
import streamlit as st
|
4 |
# Load model directly
|
5 |
from transformers import AutoTokenizer, AutoModelForImageTextToText
|
6 |
+
from transformers import TrOCRProcessor, VisionEncoderDecoderModel
|
7 |
|
8 |
tokenizer = AutoTokenizer.from_pretrained("microsoft/trocr-large-printed")
|
9 |
model = AutoModelForImageTextToText.from_pretrained("microsoft/trocr-large-printed")
|