fizban99 commited on
Commit
4183fb4
1 Parent(s): 40e2a74

Return first result

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -23,7 +23,7 @@ def search(query):
23
  cross_inp = [[query, hit] for hit in hits]
24
  cross_scores = cross_encoder.predict(cross_inp)
25
  hits = [hit for _, hit in sorted(zip(cross_scores, hits), reverse=True)]
26
- return hits
27
 
28
  iface = gr.Interface(fn=search, inputs="text", outputs="text")
29
  iface.launch()
 
23
  cross_inp = [[query, hit] for hit in hits]
24
  cross_scores = cross_encoder.predict(cross_inp)
25
  hits = [hit for _, hit in sorted(zip(cross_scores, hits), reverse=True)]
26
+ return hits[0]
27
 
28
  iface = gr.Interface(fn=search, inputs="text", outputs="text")
29
  iface.launch()