Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -98,6 +98,10 @@ def get_diy_steps_from_groq(item):
|
|
98 |
except Exception as e:
|
99 |
return f"Error fetching DIY instructions: {e}"
|
100 |
|
|
|
|
|
|
|
|
|
101 |
# Sidebar
|
102 |
st.sidebar.markdown(
|
103 |
"""
|
@@ -226,6 +230,7 @@ elif action == "Get Suggestions for Items":
|
|
226 |
unsafe_allow_html=True,
|
227 |
)
|
228 |
|
|
|
229 |
if st.session_state.clicked_diy:
|
230 |
st.markdown(
|
231 |
f"""<div style="padding: 10px; background-color: #f0f4c3; color: #33691e; border-radius: 5px;">
|
|
|
98 |
except Exception as e:
|
99 |
return f"Error fetching DIY instructions: {e}"
|
100 |
|
101 |
+
# Initialize session state for clicked DIY
|
102 |
+
if "clicked_diy" not in st.session_state:
|
103 |
+
st.session_state.clicked_diy = ""
|
104 |
+
|
105 |
# Sidebar
|
106 |
st.sidebar.markdown(
|
107 |
"""
|
|
|
230 |
unsafe_allow_html=True,
|
231 |
)
|
232 |
|
233 |
+
# Display clicked DIY instructions if available
|
234 |
if st.session_state.clicked_diy:
|
235 |
st.markdown(
|
236 |
f"""<div style="padding: 10px; background-color: #f0f4c3; color: #33691e; border-radius: 5px;">
|