Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -10,6 +10,8 @@ import base64
|
|
10 |
# Load environment variables
|
11 |
load_dotenv()
|
12 |
|
|
|
|
|
13 |
# Configure the Llama index settings
|
14 |
Settings.llm = HuggingFaceInferenceAPI(
|
15 |
model_name="google/gemma-1.1-7b-it",
|
@@ -86,7 +88,7 @@ if 'messages' not in st.session_state:
|
|
86 |
# Display or clear chat messages
|
87 |
for message in st.session_state.messages:
|
88 |
with st.chat_message(message["role"]):
|
89 |
-
st.write(message["content"])
|
90 |
|
91 |
with st.sidebar:
|
92 |
st.title("Menu:")
|
|
|
10 |
# Load environment variables
|
11 |
load_dotenv()
|
12 |
|
13 |
+
icons = {"assistant": "./assistant.jpeg", "user": "⛷️"}
|
14 |
+
|
15 |
# Configure the Llama index settings
|
16 |
Settings.llm = HuggingFaceInferenceAPI(
|
17 |
model_name="google/gemma-1.1-7b-it",
|
|
|
88 |
# Display or clear chat messages
|
89 |
for message in st.session_state.messages:
|
90 |
with st.chat_message(message["role"]):
|
91 |
+
st.write(message["content"],avatar=icons[message["role"]])
|
92 |
|
93 |
with st.sidebar:
|
94 |
st.title("Menu:")
|