Spaces:
Runtime error
Runtime error
Commit
·
f3fdc6c
1
Parent(s):
8decb2b
Update app.py
Browse files
app.py
CHANGED
@@ -11,8 +11,8 @@ HF_TOKEN = os.getenv("HF_TOKEN")
|
|
11 |
|
12 |
def img2Text(url):
|
13 |
image_to_text = pipeline("image-to-text", model="Salesforce/blip-image-captioning-large")
|
14 |
-
text = image_to_text(url)
|
15 |
st.subheader(text)
|
16 |
print(text)
|
17 |
return text
|
18 |
-
img2Text(
|
|
|
11 |
|
12 |
def img2Text(url):
|
13 |
image_to_text = pipeline("image-to-text", model="Salesforce/blip-image-captioning-large")
|
14 |
+
text = image_to_text(url)[0]["generated_text"]
|
15 |
st.subheader(text)
|
16 |
print(text)
|
17 |
return text
|
18 |
+
img2Text(photo.png)
|