Spaces:
Sleeping
Sleeping
Leo Liu
commited on
Update app.py
Browse files
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="
|
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 |
|