Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,6 @@ def load_models():
|
|
11 |
feature_extractor = ViTFeatureExtractor.from_pretrained("nlpconnect/vit-gpt2-image-captioning")
|
12 |
tokenizer = AutoTokenizer.from_pretrained("nlpconnect/vit-gpt2-image-captioning")
|
13 |
return model, feature_extractor, tokenizer
|
14 |
-
@st.experimental_singleton
|
15 |
model, feature_extractor, tokenizer = load_models()
|
16 |
#st.text("Build with Streamlit and OpenCV")
|
17 |
if "photo" not in st.session_state:
|
|
|
11 |
feature_extractor = ViTFeatureExtractor.from_pretrained("nlpconnect/vit-gpt2-image-captioning")
|
12 |
tokenizer = AutoTokenizer.from_pretrained("nlpconnect/vit-gpt2-image-captioning")
|
13 |
return model, feature_extractor, tokenizer
|
|
|
14 |
model, feature_extractor, tokenizer = load_models()
|
15 |
#st.text("Build with Streamlit and OpenCV")
|
16 |
if "photo" not in st.session_state:
|