Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -86,7 +86,7 @@ if openai_key and assistant_id:
|
|
86 |
|
87 |
assistant_icon_html = "<img src='https://www.carfind.co.za/images/Carfind-Icon.svg' width='22' style='vertical-align:middle;'/>"
|
88 |
|
89 |
-
messages_sorted = sorted(messages_response.data, key=lambda x: x.created_at, reverse=
|
90 |
for msg in messages_sorted:
|
91 |
if msg.role == "user":
|
92 |
st.markdown(
|
@@ -108,4 +108,4 @@ if openai_key and assistant_id:
|
|
108 |
except Exception as e:
|
109 |
st.error(f"An error occurred: {str(e)}")
|
110 |
else:
|
111 |
-
st.error("⚠️ OpenAI key or Assistant ID not found. Please ensure both are set as Hugging Face secrets.")
|
|
|
86 |
|
87 |
assistant_icon_html = "<img src='https://www.carfind.co.za/images/Carfind-Icon.svg' width='22' style='vertical-align:middle;'/>"
|
88 |
|
89 |
+
messages_sorted = sorted(messages_response.data, key=lambda x: x.created_at, reverse=True)
|
90 |
for msg in messages_sorted:
|
91 |
if msg.role == "user":
|
92 |
st.markdown(
|
|
|
108 |
except Exception as e:
|
109 |
st.error(f"An error occurred: {str(e)}")
|
110 |
else:
|
111 |
+
st.error("⚠️ OpenAI key or Assistant ID not found. Please ensure both are set as Hugging Face secrets.")
|