rachith commited on
Commit
dc32f0a
1 Parent(s): 4a0738f

greet button

Browse files
Files changed (1) hide show
  1. app.py +13 -1
app.py CHANGED
@@ -19,4 +19,16 @@ def zs(premise,hypothesis):
19
  entail_prob = round(probs[:,2].item() * 100,2)
20
  return contra_prob, neut_prob, entail_prob
21
 
22
- gr.Interface(fn=zs, inputs=["text", "text"], outputs="text").launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  entail_prob = round(probs[:,2].item() * 100,2)
20
  return contra_prob, neut_prob, entail_prob
21
 
22
+ # gr.Interface(fn=zs, inputs=["text", "text"], outputs=["text","text","text"]).launch()
23
+
24
+
25
+ with gr.Blocks() as demo:
26
+ premise = gr.Textbox(label="Premise")
27
+ hypothesis = gr.Textbox(label="Hypothesis")
28
+ entailment = gr.Textbox(label="Entailment Probability")
29
+ contradiction = gr.Textbox(label="Contradiction Probability")
30
+ neutral = gr.Textbox(label="Neutral Probability")
31
+ greet_btn = gr.Button("Compute")
32
+ greet_btn.click(fn=zs, inputs=[premise,hypothesis], outputs=[contradiction,neutral,entailment])
33
+
34
+ demo.launch()