suriya7 commited on
Commit
8aa52c0
1 Parent(s): 3341aad

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -10,7 +10,7 @@ import base64
10
  # Load environment variables
11
  load_dotenv()
12
 
13
- icons = {"assistant": "assistant-logo.jpg", "user": "human-logo.jpg"}
14
 
15
  # Configure the Llama index settings
16
  Settings.llm = HuggingFaceInferenceAPI(
@@ -105,12 +105,12 @@ with st.sidebar:
105
  user_prompt = st.chat_input("Ask me anything about the content of the PDF:")
106
  if user_prompt and uploaded_file:
107
  st.session_state.messages.append({'role': 'user', "content": user_prompt})
108
- with st.chat_message("user", avatar="human-logo.jpg"):
109
  st.write(user_prompt)
110
 
111
  # Generate a new response if last message is not from assistant
112
  if st.session_state.messages[-1]["role"] != "assistant":
113
- with st.chat_message("assistant",avatar="assistant-logo.jpg"):
114
  response = handle_query(user_prompt)
115
  full_response = st.write_stream(response)
116
  message = {"role": "assistant", "content": full_response}
 
10
  # Load environment variables
11
  load_dotenv()
12
 
13
+ icons = {"assistant": "robot.png", "user": "human-kddi.png"}
14
 
15
  # Configure the Llama index settings
16
  Settings.llm = HuggingFaceInferenceAPI(
 
105
  user_prompt = st.chat_input("Ask me anything about the content of the PDF:")
106
  if user_prompt and uploaded_file:
107
  st.session_state.messages.append({'role': 'user', "content": user_prompt})
108
+ with st.chat_message("user", avatar="human-kddi.png"):
109
  st.write(user_prompt)
110
 
111
  # Generate a new response if last message is not from assistant
112
  if st.session_state.messages[-1]["role"] != "assistant":
113
+ with st.chat_message("assistant",avatar="robot.png"):
114
  response = handle_query(user_prompt)
115
  full_response = st.write_stream(response)
116
  message = {"role": "assistant", "content": full_response}