wilwork commited on
Commit
8014cd1
·
verified ·
1 Parent(s): 061af0a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -7
app.py CHANGED
@@ -34,15 +34,17 @@ def test_function(query, paragraph):
34
 
35
  # Define Gradio interface
36
  interface = gr.Interface(
37
- fn=test_function,
38
- inputs=[gr.Textbox(label="Query"), gr.Textbox(label="Document Paragraph")],
39
- outputs=gr.Textbox(label="Output"),
40
- title="Test App",
41
- description="Testing if UI responds to input."
 
 
 
42
  )
43
 
44
 
45
-
46
  if __name__ == "__main__":
47
  print("Launching Gradio app...")
48
- interface.launch(share=True)
 
34
 
35
  # Define Gradio interface
36
  interface = gr.Interface(
37
+ fn=get_relevance_score,
38
+ inputs=[
39
+ gr.Textbox(label="Query", placeholder="Enter your search query..."),
40
+ gr.Textbox(label="Document Paragraph", placeholder="Enter a paragraph to match...")
41
+ ],
42
+ outputs=gr.Textbox(label="Relevance Score"),
43
+ title="Cross-Encoder Relevance Scoring",
44
+ description="Enter a query and a document paragraph to get a relevance score using the MS MARCO MiniLM L-12 v2 model."
45
  )
46
 
47
 
 
48
  if __name__ == "__main__":
49
  print("Launching Gradio app...")
50
+ interface.launch()