Spaces:
Running
Running
Fangrui Liu
commited on
Commit
β’
d2f0525
1
Parent(s):
0eab447
update banner
Browse files
app.py
CHANGED
@@ -31,8 +31,7 @@ def display(dataframe, columns):
|
|
31 |
else:
|
32 |
st.write("Sorry π΅ we didn't find any articles related to your query.\nPlease use verbs that may match the datatype.", unsafe_allow_html=True)
|
33 |
|
34 |
-
|
35 |
-
@st.experimental_singleton(show_spinner=False)
|
36 |
def build_retriever():
|
37 |
with st.spinner("Loading Model..."):
|
38 |
embeddings = HuggingFaceInstructEmbeddings(
|
@@ -110,7 +109,7 @@ if 'retriever' not in st.session_state:
|
|
110 |
st.session_state['retriever'], \
|
111 |
st.session_state['chain'] = \
|
112 |
build_retriever()
|
113 |
-
|
114 |
st.info("We provides you metadata columns below for query. Please choose a natural expression to describe filters on those columns.\n\n" +
|
115 |
"For example: \n\n- What is a Bayesian network? Please use articles published later than Feb 2018 and with more than 2 categories and whose title like `computer` and must have `cs.CV` in its category.\n" +
|
116 |
"- What is neural network? Please use articles published by Geoffrey Hinton after 2018.\n" +
|
|
|
31 |
else:
|
32 |
st.write("Sorry π΅ we didn't find any articles related to your query.\nPlease use verbs that may match the datatype.", unsafe_allow_html=True)
|
33 |
|
34 |
+
@st.cache_resource
|
|
|
35 |
def build_retriever():
|
36 |
with st.spinner("Loading Model..."):
|
37 |
embeddings = HuggingFaceInstructEmbeddings(
|
|
|
109 |
st.session_state['retriever'], \
|
110 |
st.session_state['chain'] = \
|
111 |
build_retriever()
|
112 |
+
st.info("Chat with 2 milions arxiv papers, powered by [MyScale](https://myscale.com)", icon="π")
|
113 |
st.info("We provides you metadata columns below for query. Please choose a natural expression to describe filters on those columns.\n\n" +
|
114 |
"For example: \n\n- What is a Bayesian network? Please use articles published later than Feb 2018 and with more than 2 categories and whose title like `computer` and must have `cs.CV` in its category.\n" +
|
115 |
"- What is neural network? Please use articles published by Geoffrey Hinton after 2018.\n" +
|