DrishtiSharma commited on
Commit
8edb2bc
·
verified ·
1 Parent(s): 663038b

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +5 -3
src/streamlit_app.py CHANGED
@@ -61,7 +61,8 @@ def prepare_vectorstore(uploaded_files=None):
61
 
62
  embedding = CohereEmbeddings(
63
  model="embed-multilingual-light-v3.0",
64
- cohere_api_key=COHERE_API_KEY
 
65
  )
66
 
67
  vectorstore = Chroma.from_documents(
@@ -97,7 +98,8 @@ def extract_topics(messages):
97
 
98
  embedding_llm = CohereEmbeddings(
99
  model="embed-multilingual-light-v3.0",
100
- cohere_api_key=COHERE_API_KEY
 
101
  )
102
  llm = ChatCohere(
103
  api_version="2024-02-15-preview",
@@ -206,4 +208,4 @@ if st.button("Generate Stories"):
206
  react_graph.update_state(thread, {"sub_topic_list": ['Early Hominins', 'Fossil Evidence', "Darwin's Theory of Evolution"]})
207
  result = react_graph.invoke(None, thread, stream_mode="values")
208
  for story in result["stories"]:
209
- st.markdown(story.content)
 
61
 
62
  embedding = CohereEmbeddings(
63
  model="embed-multilingual-light-v3.0",
64
+ cohere_api_key=COHERE_API_KEY,
65
+ user_agent="langgraph-app"
66
  )
67
 
68
  vectorstore = Chroma.from_documents(
 
98
 
99
  embedding_llm = CohereEmbeddings(
100
  model="embed-multilingual-light-v3.0",
101
+ cohere_api_key=COHERE_API_KEY,
102
+ user_agent="langgraph-app"
103
  )
104
  llm = ChatCohere(
105
  api_version="2024-02-15-preview",
 
208
  react_graph.update_state(thread, {"sub_topic_list": ['Early Hominins', 'Fossil Evidence', "Darwin's Theory of Evolution"]})
209
  result = react_graph.invoke(None, thread, stream_mode="values")
210
  for story in result["stories"]:
211
+ st.markdown(story.content)