Soumen commited on
Commit
e33a87d
1 Parent(s): b0c4ec9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -5,7 +5,7 @@ from transformers import VisionEncoderDecoderModel, ViTFeatureExtractor, AutoTok
5
  #pickle.load(open('energy_model.pkl', 'rb'))
6
  #vocab = np.load('w2i.p', allow_pickle=True)
7
  st.title("Image_Captioning_App")
8
- @st.experimental_singleton
9
  def load_models():
10
  model = VisionEncoderDecoderModel.from_pretrained("nlpconnect/vit-gpt2-image-captioning")
11
  feature_extractor = ViTFeatureExtractor.from_pretrained("nlpconnect/vit-gpt2-image-captioning")
 
5
  #pickle.load(open('energy_model.pkl', 'rb'))
6
  #vocab = np.load('w2i.p', allow_pickle=True)
7
  st.title("Image_Captioning_App")
8
+ @st.cache
9
  def load_models():
10
  model = VisionEncoderDecoderModel.from_pretrained("nlpconnect/vit-gpt2-image-captioning")
11
  feature_extractor = ViTFeatureExtractor.from_pretrained("nlpconnect/vit-gpt2-image-captioning")