Commit Β·
7a338e2
1
Parent(s): c8757d6
removed get url
Browse files
app.py
CHANGED
|
@@ -48,16 +48,14 @@ def main():
|
|
| 48 |
st.title("π· Image Captioning Using Transformers")
|
| 49 |
image = None
|
| 50 |
# Upload image or provide URL
|
| 51 |
-
st.write("Upload an image π€
|
| 52 |
uploaded_image = st.file_uploader("Choose an image...", type=["jpg", "jpeg", "png"])
|
| 53 |
-
image_url = st.text_input("Or provide an image URL:")
|
| 54 |
|
| 55 |
if uploaded_image is not None:
|
| 56 |
image = uploaded_image
|
| 57 |
-
elif image_url:
|
| 58 |
-
image = image_url
|
| 59 |
else:
|
| 60 |
-
st.warning("β Please upload an image
|
| 61 |
|
| 62 |
if image:
|
| 63 |
try:
|
|
|
|
| 48 |
st.title("π· Image Captioning Using Transformers")
|
| 49 |
image = None
|
| 50 |
# Upload image or provide URL
|
| 51 |
+
st.write("Upload an image π€")
|
| 52 |
uploaded_image = st.file_uploader("Choose an image...", type=["jpg", "jpeg", "png"])
|
| 53 |
+
#image_url = st.text_input("Or provide an image URL:")
|
| 54 |
|
| 55 |
if uploaded_image is not None:
|
| 56 |
image = uploaded_image
|
|
|
|
|
|
|
| 57 |
else:
|
| 58 |
+
st.warning("β Please upload an image ")
|
| 59 |
|
| 60 |
if image:
|
| 61 |
try:
|