gofeco commited on
Commit
590a02d
1 Parent(s): 017457b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -6,7 +6,8 @@ from langchain_community.vectorstores import Chroma
6
  import streamlit as st
7
 
8
  lang = st.radio("Choose Language:",
9
- ["English", "中文"])
 
10
  if lang == "English":
11
  embedding_function = SentenceTransformerEmbeddings(model_name="all-mpnet-base-v2")
12
  chdb = Chroma(persist_directory="./chroma_db_info", embedding_function=embedding_function)
@@ -14,7 +15,7 @@ else:
14
  embedding_function = SentenceTransformerEmbeddings(model_name="shibing624/text2vec-base-chinese")
15
  chdb = Chroma(persist_directory="./chroma_db_ch", embedding_function=embedding_function)
16
 
17
- query = st.text_input("Enter a query")
18
  disnum = 3
19
  if query:
20
  docs = chdb.similarity_search_with_score(query)
 
6
  import streamlit as st
7
 
8
  lang = st.radio("Choose Language:",
9
+ ["English", "中文"]
10
+ captions= ['Support in English', 'Chinese QnA'])
11
  if lang == "English":
12
  embedding_function = SentenceTransformerEmbeddings(model_name="all-mpnet-base-v2")
13
  chdb = Chroma(persist_directory="./chroma_db_info", embedding_function=embedding_function)
 
15
  embedding_function = SentenceTransformerEmbeddings(model_name="shibing624/text2vec-base-chinese")
16
  chdb = Chroma(persist_directory="./chroma_db_ch", embedding_function=embedding_function)
17
 
18
+ query = st.text_input("Enter a query about IC design:")
19
  disnum = 3
20
  if query:
21
  docs = chdb.similarity_search_with_score(query)