saritha5 commited on
Commit
327652b
1 Parent(s): 29e2c06

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -33,10 +33,12 @@ def prediction(query,top_k,corpus_embeddings,df):
33
  title = article_data["title"]
34
  st.write("-", title, "(Score: {:.4f})".format(hit['score']))
35
 
36
- query = 'Artificial Intelligence and Blockchain'
37
  # query = input("Enter the Input Query:- ")
38
  # top_sent = int(input("Enter the number of similarity sentences you want: "))
39
- top_k = 10
40
- prediction(query,top_k,all_embeddings,df)
 
 
41
 
42
 
 
33
  title = article_data["title"]
34
  st.write("-", title, "(Score: {:.4f})".format(hit['score']))
35
 
36
+ query = st.text_input('Enter your query here','Artificial Intelligence')
37
  # query = input("Enter the Input Query:- ")
38
  # top_sent = int(input("Enter the number of similarity sentences you want: "))
39
+ top_k = st.number_input('How many results do you want to see?',min_value= 2)
40
+
41
+ if st.button("Search"):
42
+ prediction(query,top_k,all_embeddings,df)
43
 
44