nickmuchi commited on
Commit
969df28
1 Parent(s): f416fa7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -89,18 +89,18 @@ with demo:
89
  gr.Markdown(description)
90
  gr.Markdown(twitter_link)
91
 
92
- slider_input = gr.Slider(minimum=3,maximum=10,value=5,step=1,label='Number of Suggestions to Generate')
93
 
94
 
95
  with gr.Row():
96
  query = gr.Textbox(lines=3,label='Describe the Netflix show or movie you would like to watch..')
97
 
98
  with gr.Row():
99
- gr.Markdown(f'''Top-{slider_input} Bi-Encoder Retrieval hits''')
100
  bi_output = gr.DataFrame(headers=['Similarity Score','Type','Title','Country','Cast','Release Year','Rating','Duration','Category Listing','Description'])
101
 
102
  with gr.Row():
103
- gr.Markdown(f'''Top-{slider_input} Cross-Encoder Re-ranker hits''')
104
  cross_output = gr.DataFrame(headers=['Similarity Score','Type','Title','Country','Cast','Release Year','Rating','Duration','Category Listing','Description'])
105
 
106
  with gr.Row():
@@ -110,7 +110,7 @@ with demo:
110
  sem_but = gr.Button('Search')
111
 
112
 
113
- sem_but.click(semantic_search,inputs=[query,dataset_embeddings,img_input,slider_input],outputs=[bi_output,cross_output],queue=True)
114
 
115
  gr.Markdown("![visitor badge](https://visitor-badge.glitch.me/badge?page_id=nickmuchi-netflix-shows-semantic-search)")
116
 
 
89
  gr.Markdown(description)
90
  gr.Markdown(twitter_link)
91
 
92
+ top_k = gr.Slider(minimum=3,maximum=10,value=5,step=1,label='Number of Suggestions to Generate')
93
 
94
 
95
  with gr.Row():
96
  query = gr.Textbox(lines=3,label='Describe the Netflix show or movie you would like to watch..')
97
 
98
  with gr.Row():
99
+ gr.Markdown(f'''Top-{top_k} Bi-Encoder Retrieval hits''')
100
  bi_output = gr.DataFrame(headers=['Similarity Score','Type','Title','Country','Cast','Release Year','Rating','Duration','Category Listing','Description'])
101
 
102
  with gr.Row():
103
+ gr.Markdown(f'''Top-{top_k} Cross-Encoder Re-ranker hits''')
104
  cross_output = gr.DataFrame(headers=['Similarity Score','Type','Title','Country','Cast','Release Year','Rating','Duration','Category Listing','Description'])
105
 
106
  with gr.Row():
 
110
  sem_but = gr.Button('Search')
111
 
112
 
113
+ sem_but.click(semantic_search,inputs=[query,dataset_embeddings,img_input,top_k],outputs=[bi_output,cross_output],queue=True)
114
 
115
  gr.Markdown("![visitor badge](https://visitor-badge.glitch.me/badge?page_id=nickmuchi-netflix-shows-semantic-search)")
116