Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -34,26 +34,22 @@ def process_query(image, query):
|
|
34 |
return response
|
35 |
|
36 |
st.set_page_config(page_title="Insightly")
|
37 |
-
# Sidebar contents
|
38 |
-
with st.sidebar:
|
39 |
-
st.sidebar.image("https://i.ibb.co/bX6GdqG/insightly-wbg.png", use_column_width=True)
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
load_dotenv()
|
45 |
-
|
46 |
|
47 |
def main():
|
48 |
st.title("Chat With Images 🖼️")
|
49 |
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
uploaded_file = st.file_uploader('Upload your Image', type=['png', 'jpeg', 'jpg'])
|
51 |
|
52 |
if uploaded_file is not None:
|
53 |
-
|
54 |
image = Image.open(uploaded_file)
|
55 |
st.image(image, caption='Uploaded Image.', width=300)
|
56 |
-
|
57 |
cancel_button = st.button('Remove this image')
|
58 |
if cancel_button:
|
59 |
st.markdown(
|
@@ -67,15 +63,16 @@ def main():
|
|
67 |
</style>""",
|
68 |
unsafe_allow_html=True
|
69 |
)
|
|
|
70 |
query = st.text_input('Type your question here')
|
71 |
|
72 |
if query:
|
73 |
with st.spinner('Processing...'):
|
74 |
answer = process_query(image, query)
|
75 |
st.write(answer)
|
76 |
-
|
77 |
if cancel_button:
|
78 |
st.stop()
|
79 |
-
|
80 |
if __name__ == "__main__":
|
81 |
main()
|
|
|
34 |
return response
|
35 |
|
36 |
st.set_page_config(page_title="Insightly")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
|
38 |
def main():
|
39 |
st.title("Chat With Images 🖼️")
|
40 |
|
41 |
+
# Add a link in the sidebar
|
42 |
+
st.sidebar.markdown("<p class='sidebar-link'>📈 <a href='https://insightly-csv-bot.hf.space/'> CSV Bot</a></p>", unsafe_allow_html=True)
|
43 |
+
st.sidebar.markdown("<p class='sidebar-link'>📚 <a href='https://chandrakalagowda-demo2.hf.space/'> PDF Bot </a></p>", unsafe_allow_html=True)
|
44 |
+
st.sidebar.markdown("<p class='sidebar-link'>🖼️ <a href='https://insightly-image-reader.hf.space'> Frame Capturer</a></p>", unsafe_allow_html=True)
|
45 |
+
|
46 |
+
|
47 |
uploaded_file = st.file_uploader('Upload your Image', type=['png', 'jpeg', 'jpg'])
|
48 |
|
49 |
if uploaded_file is not None:
|
|
|
50 |
image = Image.open(uploaded_file)
|
51 |
st.image(image, caption='Uploaded Image.', width=300)
|
52 |
+
|
53 |
cancel_button = st.button('Remove this image')
|
54 |
if cancel_button:
|
55 |
st.markdown(
|
|
|
63 |
</style>""",
|
64 |
unsafe_allow_html=True
|
65 |
)
|
66 |
+
|
67 |
query = st.text_input('Type your question here')
|
68 |
|
69 |
if query:
|
70 |
with st.spinner('Processing...'):
|
71 |
answer = process_query(image, query)
|
72 |
st.write(answer)
|
73 |
+
|
74 |
if cancel_button:
|
75 |
st.stop()
|
76 |
+
|
77 |
if __name__ == "__main__":
|
78 |
main()
|