Spaces:
Runtime error
Runtime error
Commit
·
b83b86b
1
Parent(s):
9b198d7
File uploader updated
Browse files
app.py
CHANGED
@@ -75,12 +75,11 @@ for message in chat_history:
|
|
75 |
|
76 |
conn.close()
|
77 |
|
78 |
-
# Separate section for image uploading
|
79 |
st.title("Image Description Generator")
|
80 |
|
81 |
-
uploaded_file = st.
|
82 |
|
83 |
-
# Text input for asking questions about the image
|
84 |
image_question = st.text_input("Ask something about the image:")
|
85 |
|
86 |
if uploaded_file and image_question:
|
@@ -103,4 +102,4 @@ if uploaded_file and image_question:
|
|
103 |
)
|
104 |
|
105 |
response = model.generate_content(prompt_parts)
|
106 |
-
st.markdown(f"**Model's answer:** {response.text}")
|
|
|
75 |
|
76 |
conn.close()
|
77 |
|
78 |
+
# Separate section for image uploading and description generation
|
79 |
st.title("Image Description Generator")
|
80 |
|
81 |
+
uploaded_file = st.image_uploader("Upload an image here or paste a screenshot", type=["png", "jpg", "jpeg"])
|
82 |
|
|
|
83 |
image_question = st.text_input("Ask something about the image:")
|
84 |
|
85 |
if uploaded_file and image_question:
|
|
|
102 |
)
|
103 |
|
104 |
response = model.generate_content(prompt_parts)
|
105 |
+
st.markdown(f"**Model's answer:** {response.text}")
|