badr-mardi commited on
Commit
f89c228
·
verified ·
1 Parent(s): f8c5155

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -1,14 +1,15 @@
 
1
  import streamlit as st
2
- from langchain_cohere.llms import Cohere
3
  from streamlit_chat import message
4
 
5
 
6
  def api_calling(question):
7
- model = Cohere(cohere_api_key='gym8F1vSoz4RazTSa8D9YjuINil8VLV6oUHqJ2jh')
8
  response = model.invoke(question)
9
  return response
10
 
11
- st.title("CHATBOT OF MARDI BADR")
12
  if 'user_input' not in st.session_state:
13
  st.session_state['user_input'] = []
14
 
@@ -36,7 +37,8 @@ if st.session_state['user_input']:
36
  # This function displays user input
37
  message(st.session_state["user_input"][i],
38
  key=str(i),avatar_style="icons")
39
- # This function displays OpenAI response
40
- message(st.session_state['openai_response'][i],
41
  avatar_style="miniavs",is_user=True,
42
  key=str(i) + 'data_by_user')
 
 
 
1
+
2
  import streamlit as st
3
+ from langchain.llms import Cohere
4
  from streamlit_chat import message
5
 
6
 
7
  def api_calling(question):
8
+ model = Cohere(cohere_api_key='AwUrUmbrQPC8ROSvqGdSxlYM8TZjgfOYGxNmGaci')
9
  response = model.invoke(question)
10
  return response
11
 
12
+ st.title("COHERE CHATBOT BADR")
13
  if 'user_input' not in st.session_state:
14
  st.session_state['user_input'] = []
15
 
 
37
  # This function displays user input
38
  message(st.session_state["user_input"][i],
39
  key=str(i),avatar_style="icons")
40
+ message(st.session_state['cohere_response'][i],
 
41
  avatar_style="miniavs",is_user=True,
42
  key=str(i) + 'data_by_user')
43
+ `
44
+ `