neha-ai-playground commited on
Commit
f3fdc6c
·
1 Parent(s): 8decb2b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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(test-photo.png)
 
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)