Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -445,7 +445,6 @@ def page2():
|
|
445 |
duration = end_time - start_time
|
446 |
|
447 |
st.session_state['chat_history_page2'].append(("Eve", response, "new"))
|
448 |
-
st.text(f"Response time: {duration:.2f} seconds")
|
449 |
|
450 |
|
451 |
# Combine chat histories from all pages
|
@@ -464,7 +463,9 @@ def page2():
|
|
464 |
background_color = "#ffeecf" if chat[2] == "new" else "#ffeecf" if chat[0] == "User" else "#ffeecf"
|
465 |
new_messages_placeholder.markdown(f"<div style='background-color: {background_color}; padding: 10px; border-radius: 10px; margin: 10px;'>{chat[0]}: {chat[1]}</div>", unsafe_allow_html=True)
|
466 |
|
467 |
-
|
|
|
|
|
468 |
# Clear the input field after the query is made
|
469 |
query = ""
|
470 |
|
@@ -547,6 +548,7 @@ def page3():
|
|
547 |
|
548 |
# Start timing
|
549 |
start_time = time.time()
|
|
|
550 |
# Create a placeholder for the response time
|
551 |
response_time_placeholder = st.empty()
|
552 |
|
|
|
445 |
duration = end_time - start_time
|
446 |
|
447 |
st.session_state['chat_history_page2'].append(("Eve", response, "new"))
|
|
|
448 |
|
449 |
|
450 |
# Combine chat histories from all pages
|
|
|
463 |
background_color = "#ffeecf" if chat[2] == "new" else "#ffeecf" if chat[0] == "User" else "#ffeecf"
|
464 |
new_messages_placeholder.markdown(f"<div style='background-color: {background_color}; padding: 10px; border-radius: 10px; margin: 10px;'>{chat[0]}: {chat[1]}</div>", unsafe_allow_html=True)
|
465 |
|
466 |
+
# Update the response time placeholder after the messages are displayed
|
467 |
+
response_time_placeholder.text(f"Response time: {duration:.2f} seconds")
|
468 |
+
|
469 |
# Clear the input field after the query is made
|
470 |
query = ""
|
471 |
|
|
|
548 |
|
549 |
# Start timing
|
550 |
start_time = time.time()
|
551 |
+
|
552 |
# Create a placeholder for the response time
|
553 |
response_time_placeholder = st.empty()
|
554 |
|