Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -45,15 +45,9 @@ st.markdown(f"Nmber of documents: `{len(docs)}`.")
|
|
45 |
st.markdown(f"From `{oldest_date.strftime('%Y-%m-%d')}` to `{newest_date.strftime('%Y-%m-%d')}`.")
|
46 |
st.markdown("This app uses [BM25](https://en.wikipedia.org/wiki/Okapi_BM25), allowing you to search not only with keywords like \"machine learning\" \n but also with documents like \"How to generate synthetic data using LLM.\"")
|
47 |
|
48 |
-
|
49 |
|
50 |
-
|
51 |
-
user_query = st.text_input("", placeholder="Search anything...")
|
52 |
-
|
53 |
-
with col2:
|
54 |
-
search_button = st.button('→')
|
55 |
-
|
56 |
-
if search_button:
|
57 |
results = retriever.invoke(user_query)
|
58 |
st.text(f"Top n {len(results)} related papers")
|
59 |
|
|
|
45 |
st.markdown(f"From `{oldest_date.strftime('%Y-%m-%d')}` to `{newest_date.strftime('%Y-%m-%d')}`.")
|
46 |
st.markdown("This app uses [BM25](https://en.wikipedia.org/wiki/Okapi_BM25), allowing you to search not only with keywords like \"machine learning\" \n but also with documents like \"How to generate synthetic data using LLM.\"")
|
47 |
|
48 |
+
prompt = st.chat_input("Search anything...")
|
49 |
|
50 |
+
if prompt:
|
|
|
|
|
|
|
|
|
|
|
|
|
51 |
results = retriever.invoke(user_query)
|
52 |
st.text(f"Top n {len(results)} related papers")
|
53 |
|