Spaces:
Build error
Build error
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="Salesforce/blip-image-captioning-base")
|
| 9 |
text = image_to_text_model(url)[0]["generated_text"]
|
| 10 |
return text
|
| 11 |
|