Update app.py
Browse files
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
|
| 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
|
| 31 |
|
| 32 |
# You can add more processing or explanations here if needed
|
| 33 |
|
| 34 |
-
st.sidebar.text("Built with ❤️ by Your
|
|
|
|
| 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")
|