Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,12 @@ from PIL import Image
|
|
4 |
from transformers import VisionEncoderDecoderModel, ViTFeatureExtractor, AutoTokenizer
|
5 |
#pickle.load(open('energy_model.pkl', 'rb'))
|
6 |
#vocab = np.load('w2i.p', allow_pickle=True)
|
7 |
-
st.
|
|
|
|
|
|
|
|
|
|
|
8 |
model = VisionEncoderDecoderModel.from_pretrained("nlpconnect/vit-gpt2-image-captioning")
|
9 |
feature_extractor = ViTFeatureExtractor.from_pretrained("nlpconnect/vit-gpt2-image-captioning")
|
10 |
tokenizer = AutoTokenizer.from_pretrained("nlpconnect/vit-gpt2-image-captioning")
|
|
|
4 |
from transformers import VisionEncoderDecoderModel, ViTFeatureExtractor, AutoTokenizer
|
5 |
#pickle.load(open('energy_model.pkl', 'rb'))
|
6 |
#vocab = np.load('w2i.p', allow_pickle=True)
|
7 |
+
st.set_page_config(
|
8 |
+
page_title="Image_Captioning_App",
|
9 |
+
page_icon="🧊",
|
10 |
+
layout="wide",
|
11 |
+
initial_sidebar_state="expanded"
|
12 |
+
)
|
13 |
model = VisionEncoderDecoderModel.from_pretrained("nlpconnect/vit-gpt2-image-captioning")
|
14 |
feature_extractor = ViTFeatureExtractor.from_pretrained("nlpconnect/vit-gpt2-image-captioning")
|
15 |
tokenizer = AutoTokenizer.from_pretrained("nlpconnect/vit-gpt2-image-captioning")
|