yutohub commited on
Commit
bec3a32
1 Parent(s): 3e2bddf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -8
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
- col1, col2 = st.columns([4, 1])
49
 
50
- with col1:
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