Leo Liu commited on
Commit
2d5d1a8
·
verified ·
1 Parent(s): 6ef9f92

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -5,7 +5,7 @@ import streamlit as st
5
  # function part
6
  # img2text
7
  def img2text(url):
8
- image_to_text_model = pipeline("image-to-text", model="Salesforce/blip-image-captioning-base") # model is slow
9
  text = image_to_text_model(url)[0]["generated_text"]
10
  return text
11
 
 
5
  # function part
6
  # img2text
7
  def img2text(url):
8
+ image_to_text_model = pipeline("image-to-text", model="nlpconnect/vit-gpt2-image-captioning")
9
  text = image_to_text_model(url)[0]["generated_text"]
10
  return text
11