Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -60,8 +60,8 @@ if __name__ == "__main__":
|
|
60 |
|
61 |
width, height = gold_standard_img.size
|
62 |
|
63 |
-
gold_standard_img.save('gold_standard.png'
|
64 |
-
best_parse_img.save('best_parse.png'
|
65 |
|
66 |
gold_standard_img_png = Image.open("gold_standard.png")
|
67 |
best_parse_img_png = Image.open("best_parse.png")
|
@@ -74,7 +74,7 @@ if __name__ == "__main__":
|
|
74 |
description="Demo for the repository - [weakly-supervised-parsing](https://github.com/Nickil21/weakly-supervised-parsing) (ACL Findings 2022)",
|
75 |
theme="default",
|
76 |
article="""<h4 class='text-lg font-semibold my-2'>Note</h4>
|
77 |
-
- We use a strong supervised parsing model `benepar_en3` which is based on T5-small to compute the
|
78 |
- Sentence F1 score corresponds to the macro F1 score.
|
79 |
""",
|
80 |
allow_flagging="never",
|
@@ -84,7 +84,7 @@ if __name__ == "__main__":
|
|
84 |
gradio.inputs.Radio(["inside", "outside", "inside-outside"], default="inside", label="Choose Model"),
|
85 |
],
|
86 |
outputs=[
|
87 |
-
gradio.outputs.Image(label="
|
88 |
gradio.outputs.Image(label="Predicted Parse Tree", type="pil"),
|
89 |
gradio.outputs.Textbox(label="F1 score"),
|
90 |
],
|
|
|
60 |
|
61 |
width, height = gold_standard_img.size
|
62 |
|
63 |
+
gold_standard_img.save('gold_standard.png')
|
64 |
+
best_parse_img.save('best_parse.png')
|
65 |
|
66 |
gold_standard_img_png = Image.open("gold_standard.png")
|
67 |
best_parse_img_png = Image.open("best_parse.png")
|
|
|
74 |
description="Demo for the repository - [weakly-supervised-parsing](https://github.com/Nickil21/weakly-supervised-parsing) (ACL Findings 2022)",
|
75 |
theme="default",
|
76 |
article="""<h4 class='text-lg font-semibold my-2'>Note</h4>
|
77 |
+
- We use a strong supervised parsing model `benepar_en3` which is based on T5-small to compute the reference parse.<br>
|
78 |
- Sentence F1 score corresponds to the macro F1 score.
|
79 |
""",
|
80 |
allow_flagging="never",
|
|
|
84 |
gradio.inputs.Radio(["inside", "outside", "inside-outside"], default="inside", label="Choose Model"),
|
85 |
],
|
86 |
outputs=[
|
87 |
+
gradio.outputs.Image(label="Reference Parse Tree (BeNePar)", type="pil"),
|
88 |
gradio.outputs.Image(label="Predicted Parse Tree", type="pil"),
|
89 |
gradio.outputs.Textbox(label="F1 score"),
|
90 |
],
|