Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,6 @@ from transformers import pipeline, AutoModelForSequenceClassification, AutoToken
|
|
4 |
import torch
|
5 |
|
6 |
# Initialize the image-to-text pipeline and models
|
7 |
-
@st.cache(allow_output_mutation=True)
|
8 |
def load_models():
|
9 |
# Make sure to use the correct model names and tokenizer
|
10 |
image_pipeline = pipeline("image-to-text", model="microsoft/trocr-large-printed")
|
|
|
4 |
import torch
|
5 |
|
6 |
# Initialize the image-to-text pipeline and models
|
|
|
7 |
def load_models():
|
8 |
# Make sure to use the correct model names and tokenizer
|
9 |
image_pipeline = pipeline("image-to-text", model="microsoft/trocr-large-printed")
|