From fe1eafd2794b5a68c9271d7b88bf2d9b8116a78b Mon Sep 17 00:00:00 2001 From: Ashpreet Bedi Date: Sun, 4 Feb 2024 00:13:23 +0000 Subject: [PATCH] v2.3.13 --- app/pages/2_Image_Assistant.py | 11 ++++++----- app/pages/3_Website_Assistant.py | 11 ++++++----- workspace/prd_resources.py | 2 +- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/app/pages/2_Image_Assistant.py b/app/pages/2_Image_Assistant.py index e89b34e..e1b0ece 100644 --- a/app/pages/2_Image_Assistant.py +++ b/app/pages/2_Image_Assistant.py @@ -215,11 +215,12 @@ def main() -> None: if last_message.get("role") == "user": question = last_message["content"] with st.chat_message("assistant"): - response = "" - resp_container = st.empty() - for delta in image_assistant.run(question): - response += delta # type: ignore - resp_container.markdown(response) + with st.spinner("Working..."): + response = "" + resp_container = st.empty() + for delta in image_assistant.run(question): + response += delta # type: ignore + resp_container.markdown(response) st.session_state["messages"].append({"role": "assistant", "content": response}) if image_assistant.storage: diff --git a/app/pages/3_Website_Assistant.py b/app/pages/3_Website_Assistant.py index 7b2e890..74725f1 100644 --- a/app/pages/3_Website_Assistant.py +++ b/app/pages/3_Website_Assistant.py @@ -110,11 +110,12 @@ def main() -> None: if last_message.get("role", "") == "user": question = last_message["content"] with st.chat_message("assistant"): - response = "" - resp_container = st.empty() - for delta in website_assistant.run(question): - response += delta # type: ignore - resp_container.markdown(response) + with st.spinner("Working..."): + response = "" + resp_container = st.empty() + for delta in website_assistant.run(question): + response += delta # type: ignore + resp_container.markdown(response) st.session_state["messages"].append({"role": "assistant", "content": response}) diff --git a/workspace/prd_resources.py b/workspace/prd_resources.py index 7fe7cc4..473c43f 100644 --- a/workspace/prd_resources.py +++ b/workspace/prd_resources.py @@ -220,7 +220,7 @@ prd_fastapi = FastApi( name=f"{ws_settings.prd_key}-api", enabled=ws_settings.prd_api_enabled, - group="app", + group="api", image=prd_image, command="uvicorn api.main:app", port_number=8000,