Spaces:
Build error
Build error
removed neutral
Browse files
app.py
CHANGED
@@ -18,7 +18,9 @@ def zs(premise,hypothesis):
|
|
18 |
contra_prob = round(probs[:,0].item() * 100,2)
|
19 |
# neut_prob = round(probs[:,1].item() * 100,2)
|
20 |
entail_prob = round(probs[:,2].item() * 100,2)
|
21 |
-
return contra_prob, neut_prob, entail_prob
|
|
|
|
|
22 |
|
23 |
# gr.Interface(fn=zs, inputs=["text", "text"], outputs=["text","text","text"]).launch()
|
24 |
|
@@ -32,7 +34,9 @@ with gr.Blocks() as demo:
|
|
32 |
with gr.Row():
|
33 |
entailment = gr.Textbox(label="Entailment Probability")
|
34 |
contradiction = gr.Textbox(label="Contradiction Probability")
|
35 |
-
neutral = gr.Textbox(label="Neutral Probability")
|
36 |
-
greet_btn.click(fn=zs, inputs=[premise,hypothesis], outputs=[contradiction,neutral,entailment])
|
|
|
|
|
37 |
|
38 |
demo.launch()
|
|
|
18 |
contra_prob = round(probs[:,0].item() * 100,2)
|
19 |
# neut_prob = round(probs[:,1].item() * 100,2)
|
20 |
entail_prob = round(probs[:,2].item() * 100,2)
|
21 |
+
# return contra_prob, neut_prob, entail_prob
|
22 |
+
return contra_prob, entail_prob
|
23 |
+
|
24 |
|
25 |
# gr.Interface(fn=zs, inputs=["text", "text"], outputs=["text","text","text"]).launch()
|
26 |
|
|
|
34 |
with gr.Row():
|
35 |
entailment = gr.Textbox(label="Entailment Probability")
|
36 |
contradiction = gr.Textbox(label="Contradiction Probability")
|
37 |
+
# neutral = gr.Textbox(label="Neutral Probability")
|
38 |
+
# greet_btn.click(fn=zs, inputs=[premise,hypothesis], outputs=[contradiction,neutral,entailment])
|
39 |
+
greet_btn.click(fn=zs, inputs=[premise,hypothesis], outputs=[contradiction,entailment])
|
40 |
+
|
41 |
|
42 |
demo.launch()
|