mkoot007 commited on
Commit
9e6a3e4
·
1 Parent(s): 1a63a37

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -1,10 +1,9 @@
1
  import streamlit as st
2
  from PIL import Image
3
- import torch
4
  from transformers import pipeline
5
 
6
- # Initialize the Hugging Face model for image captioning
7
- image_captioning_model = pipeline("image-captioning")
8
 
9
  # Streamlit app title and description
10
  st.title("Image Information Extractor")
@@ -27,8 +26,8 @@ if image:
27
  # Display the image description
28
  st.write("Image Description:")
29
  for caption in captions:
30
- st.write(caption["caption"])
31
 
32
  # You can add more processing or explanations here if needed
33
 
34
- st.sidebar.text("Built with ❤️ by Your Moneeb")
 
1
  import streamlit as st
2
  from PIL import Image
 
3
  from transformers import pipeline
4
 
5
+ # Initialize the image captioning model
6
+ image_captioning_model = pipeline("image-captioning", model="Salesforce/blip-image-captioning-large")
7
 
8
  # Streamlit app title and description
9
  st.title("Image Information Extractor")
 
26
  # Display the image description
27
  st.write("Image Description:")
28
  for caption in captions:
29
+ st.write(caption)
30
 
31
  # You can add more processing or explanations here if needed
32
 
33
+ st.sidebar.text("Built with ❤️ by Your Name")