Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -72,6 +72,12 @@ elif hasattr(st.session_state.run, 'status') and st.session_state.run.status ==
|
|
| 72 |
thread_id=st.session_state.thread.id
|
| 73 |
)
|
| 74 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 75 |
# Display messages
|
| 76 |
for message in reversed(st.session_state.messages.data):
|
| 77 |
if message.role in ["user", "assistant"]:
|
|
@@ -86,6 +92,7 @@ elif hasattr(st.session_state.run, 'status') and st.session_state.run.status ==
|
|
| 86 |
if image:
|
| 87 |
st.image(image, caption="Generated Image")
|
| 88 |
|
|
|
|
| 89 |
|
| 90 |
if prompt := st.chat_input("Wie kann ich dir helfen?"):
|
| 91 |
with st.chat_message('user'):
|
|
|
|
| 72 |
thread_id=st.session_state.thread.id
|
| 73 |
)
|
| 74 |
|
| 75 |
+
end_time = time.time() # Stop the timer
|
| 76 |
+
duration = end_time - start_time # Calculate duration
|
| 77 |
+
|
| 78 |
+
st.write(f"Response time: {duration:.2f} seconds")
|
| 79 |
+
|
| 80 |
+
|
| 81 |
# Display messages
|
| 82 |
for message in reversed(st.session_state.messages.data):
|
| 83 |
if message.role in ["user", "assistant"]:
|
|
|
|
| 92 |
if image:
|
| 93 |
st.image(image, caption="Generated Image")
|
| 94 |
|
| 95 |
+
start_time = time.time() # Start the timer
|
| 96 |
|
| 97 |
if prompt := st.chat_input("Wie kann ich dir helfen?"):
|
| 98 |
with st.chat_message('user'):
|