Spaces:
Sleeping
Sleeping
wavesoumen
commited on
Commit
•
ee2e9d3
1
Parent(s):
a429f36
Update app.py
Browse files
app.py
CHANGED
@@ -139,13 +139,15 @@ with tab3:
|
|
139 |
|
140 |
if st.button("Analysis Image"):
|
141 |
if image_url:
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
|
|
|
|
149 |
|
150 |
# YouTube Transcript Tab
|
151 |
with tab4:
|
@@ -196,4 +198,3 @@ with tab5:
|
|
196 |
st.write(point_of_view)
|
197 |
else:
|
198 |
st.warning("Please enter text to analyze.")
|
199 |
-
|
|
|
139 |
|
140 |
if st.button("Analysis Image"):
|
141 |
if image_url:
|
142 |
+
try:
|
143 |
+
st.image(image_url, caption="Provided Image", use_column_width=True)
|
144 |
+
caption = captioner(image_url)
|
145 |
+
st.write("**Generated Caption:**")
|
146 |
+
st.write(caption[0]['generated_text'])
|
147 |
+
except Exception as e:
|
148 |
+
st.error(f"An error occurred: {e}")
|
149 |
+
else:
|
150 |
+
st.warning("Please give a image url.")
|
151 |
|
152 |
# YouTube Transcript Tab
|
153 |
with tab4:
|
|
|
198 |
st.write(point_of_view)
|
199 |
else:
|
200 |
st.warning("Please enter text to analyze.")
|
|