Spaces:
Sleeping
Sleeping
Update app,py
Browse files
app.py
CHANGED
|
@@ -68,9 +68,6 @@ if openai_key and assistant_id:
|
|
| 68 |
)
|
| 69 |
append_to_transcript(st.session_state["thread_id"], "user", user_input)
|
| 70 |
|
| 71 |
-
# Clear input box after sending
|
| 72 |
-
st.session_state["chat_input"] = ""
|
| 73 |
-
|
| 74 |
try:
|
| 75 |
with st.spinner("Thinking and typing... 💭"):
|
| 76 |
run = client.beta.threads.runs.create(
|
|
@@ -111,7 +108,7 @@ if openai_key and assistant_id:
|
|
| 111 |
unsafe_allow_html=True
|
| 112 |
)
|
| 113 |
|
| 114 |
-
#
|
| 115 |
st.markdown("""
|
| 116 |
<script>
|
| 117 |
window.scrollTo(0, 0);
|
|
@@ -121,4 +118,4 @@ if openai_key and assistant_id:
|
|
| 121 |
except Exception as e:
|
| 122 |
st.error(f"An error occurred: {str(e)}")
|
| 123 |
else:
|
| 124 |
-
st.error("⚠️ OpenAI key or Assistant ID not found
|
|
|
|
| 68 |
)
|
| 69 |
append_to_transcript(st.session_state["thread_id"], "user", user_input)
|
| 70 |
|
|
|
|
|
|
|
|
|
|
| 71 |
try:
|
| 72 |
with st.spinner("Thinking and typing... 💭"):
|
| 73 |
run = client.beta.threads.runs.create(
|
|
|
|
| 108 |
unsafe_allow_html=True
|
| 109 |
)
|
| 110 |
|
| 111 |
+
# Scroll to top automatically
|
| 112 |
st.markdown("""
|
| 113 |
<script>
|
| 114 |
window.scrollTo(0, 0);
|
|
|
|
| 118 |
except Exception as e:
|
| 119 |
st.error(f"An error occurred: {str(e)}")
|
| 120 |
else:
|
| 121 |
+
st.error("⚠️ OpenAI key or Assistant ID not found
|