Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -33,8 +33,6 @@ if "pending_prompt" not in st.session_state:
|
|
33 |
st.session_state.pending_prompt = None
|
34 |
if "results" not in st.session_state:
|
35 |
st.session_state.results = []
|
36 |
-
if "lightbox_url" not in st.session_state:
|
37 |
-
st.session_state.lightbox_url = None
|
38 |
|
39 |
# ------------------ Sidebar ------------------
|
40 |
st.sidebar.header("ℹ️ Information")
|
@@ -43,7 +41,6 @@ if st.sidebar.button("🧹 Clear Chat"):
|
|
43 |
st.session_state.thread_id = None
|
44 |
st.session_state.pending_prompt = None
|
45 |
st.session_state.results = []
|
46 |
-
st.session_state.lightbox_url = None
|
47 |
st.rerun()
|
48 |
|
49 |
# ------------------ Chat Input ------------------
|
@@ -117,9 +114,8 @@ if st.session_state.results:
|
|
117 |
st.markdown(f"_Discipline: {item['discipline']}_")
|
118 |
st.caption(item.get("summary", ""))
|
119 |
for url in item.get("images", [])[:1]:
|
120 |
-
st.image(url, use_column_width=True)
|
121 |
-
|
122 |
else:
|
123 |
for msg in st.session_state.messages:
|
124 |
with st.chat_message(msg["role"]):
|
125 |
-
st.markdown(msg["content"], unsafe_allow_html=True)
|
|
|
33 |
st.session_state.pending_prompt = None
|
34 |
if "results" not in st.session_state:
|
35 |
st.session_state.results = []
|
|
|
|
|
36 |
|
37 |
# ------------------ Sidebar ------------------
|
38 |
st.sidebar.header("ℹ️ Information")
|
|
|
41 |
st.session_state.thread_id = None
|
42 |
st.session_state.pending_prompt = None
|
43 |
st.session_state.results = []
|
|
|
44 |
st.rerun()
|
45 |
|
46 |
# ------------------ Chat Input ------------------
|
|
|
114 |
st.markdown(f"_Discipline: {item['discipline']}_")
|
115 |
st.caption(item.get("summary", ""))
|
116 |
for url in item.get("images", [])[:1]:
|
117 |
+
st.image(url, caption=f"{item['drawing_number']} – Page 1", use_column_width=True)
|
|
|
118 |
else:
|
119 |
for msg in st.session_state.messages:
|
120 |
with st.chat_message(msg["role"]):
|
121 |
+
st.markdown(msg["content"], unsafe_allow_html=True)
|