nickil commited on
Commit
e5cc39f
1 Parent(s): 9c5ac63

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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', dpi=(600, 600), quality=95)
64
- best_parse_img.save('best_parse.png', dpi=(600, 600), quality=95)
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 gold parse.<br>
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="Gold Parse Tree", type="pil"),
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
  ],