Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -8,11 +8,13 @@ def main():
|
|
8 |
|
9 |
with st.form("text_field"):
|
10 |
file = st.file_uploader("Upload image", type=["jpg", "png"] )
|
|
|
|
|
11 |
text_input = st.text_input("Enter some question :")
|
12 |
# clicked==True only when the button is clicked
|
13 |
clicked = st.form_submit_button("Submit")
|
14 |
if clicked:
|
15 |
-
results = question(
|
16 |
st.json(results)
|
17 |
|
18 |
if __name__ == "__main__":
|
|
|
8 |
|
9 |
with st.form("text_field"):
|
10 |
file = st.file_uploader("Upload image", type=["jpg", "png"] )
|
11 |
+
img = Image.open(image_file)
|
12 |
+
image = st.image(img)
|
13 |
text_input = st.text_input("Enter some question :")
|
14 |
# clicked==True only when the button is clicked
|
15 |
clicked = st.form_submit_button("Submit")
|
16 |
if clicked:
|
17 |
+
results = question(image , str(text_input))
|
18 |
st.json(results)
|
19 |
|
20 |
if __name__ == "__main__":
|