Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -8,6 +8,9 @@ from io import StringIO
|
|
| 8 |
import time
|
| 9 |
|
| 10 |
def print_time(start, end):
|
|
|
|
|
|
|
|
|
|
| 11 |
st.session_state.messages.append({"role": "assistant", "content": f"Execution time: {end - start} seconds"})
|
| 12 |
|
| 13 |
# Streamlit app
|
|
|
|
| 8 |
import time
|
| 9 |
|
| 10 |
def print_time(start, end):
|
| 11 |
+
# Initialize chat history
|
| 12 |
+
if "messages" not in st.session_state:
|
| 13 |
+
st.session_state.messages = []
|
| 14 |
st.session_state.messages.append({"role": "assistant", "content": f"Execution time: {end - start} seconds"})
|
| 15 |
|
| 16 |
# Streamlit app
|