Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,7 +6,7 @@ import os # Import the os module
|
|
| 6 |
openai_api_key = os.getenv("OPENAI_API_KEY")
|
| 7 |
|
| 8 |
st.title("💬 Chatbot")
|
| 9 |
-
st.caption("
|
| 10 |
if "messages" not in st.session_state:
|
| 11 |
st.session_state["messages"] = [{"role": "assistant", "content": "How can I help you?"}]
|
| 12 |
|
|
@@ -26,8 +26,3 @@ if prompt := st.chat_input():
|
|
| 26 |
st.session_state.messages.append({"role": "assistant", "content": msg})
|
| 27 |
st.chat_message("assistant").write(msg)
|
| 28 |
|
| 29 |
-
# Links and additional information in the sidebar
|
| 30 |
-
with st.sidebar:
|
| 31 |
-
"[Get an OpenAI API key](https://platform.openai.com/account/api-keys)"
|
| 32 |
-
"[View the source code](https://github.com/streamlit/llm-examples/blob/main/Chatbot.py)"
|
| 33 |
-
"[](https://codespaces.new/streamlit/llm-examples?quickstart=1)"
|
|
|
|
| 6 |
openai_api_key = os.getenv("OPENAI_API_KEY")
|
| 7 |
|
| 8 |
st.title("💬 Chatbot")
|
| 9 |
+
st.caption("")
|
| 10 |
if "messages" not in st.session_state:
|
| 11 |
st.session_state["messages"] = [{"role": "assistant", "content": "How can I help you?"}]
|
| 12 |
|
|
|
|
| 26 |
st.session_state.messages.append({"role": "assistant", "content": msg})
|
| 27 |
st.chat_message("assistant").write(msg)
|
| 28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|