Soumen commited on
Commit
3dbef8c
1 Parent(s): b0eeef6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
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.title("img_captioning_app")
 
 
 
 
 
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")