Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -78,12 +78,12 @@ interface_words = gr.Interface(
|
|
| 78 |
examples=example_main,
|
| 79 |
)
|
| 80 |
|
| 81 |
-
interface_model_L = gr.Interface(
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
)
|
| 86 |
-
interface_model_L.load("models/DReAMy-lib/xlm-roberta-large-DreamBank-emotion-presence")
|
| 87 |
|
| 88 |
|
| 89 |
# interface_model_S = gr.Interface.load(
|
|
@@ -98,19 +98,19 @@ interface_model_L.load("models/DReAMy-lib/xlm-roberta-large-DreamBank-emotion-pr
|
|
| 98 |
# title="SA Generation",
|
| 99 |
# )
|
| 100 |
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
|
| 115 |
# interface_model_NER = gr.Interface.load(
|
| 116 |
# "models/DReAMy-lib/t5-base-DreamBank-Generation-NER-Char",
|
|
@@ -119,6 +119,6 @@ interface_model_L.load("models/DReAMy-lib/xlm-roberta-large-DreamBank-emotion-pr
|
|
| 119 |
# )
|
| 120 |
|
| 121 |
gr.TabbedInterface(
|
| 122 |
-
[interface_words,
|
| 123 |
-
["Main","
|
| 124 |
).launch()
|
|
|
|
| 78 |
examples=example_main,
|
| 79 |
)
|
| 80 |
|
| 81 |
+
# interface_model_L = gr.Interface(
|
| 82 |
+
# description=description_L,
|
| 83 |
+
# examples=examples,
|
| 84 |
+
# title="SA Large Multilingual",
|
| 85 |
+
# )
|
| 86 |
+
# interface_model_L.load("models/DReAMy-lib/xlm-roberta-large-DreamBank-emotion-presence")
|
| 87 |
|
| 88 |
|
| 89 |
# interface_model_S = gr.Interface.load(
|
|
|
|
| 98 |
# title="SA Generation",
|
| 99 |
# )
|
| 100 |
|
| 101 |
+
interface_model_RE = gr.Interface(
|
| 102 |
+
text_to_graph,
|
| 103 |
+
inputs=gr.Textbox(label="Text", placeholder="Enter a text here."),
|
| 104 |
+
outputs=[gr.HTML(label="Extracted graph"),gr.Textbox(label="Extracted text")],
|
| 105 |
+
examples= [
|
| 106 |
+
["I was skating on the outdoor ice pond that used to be across the street from my house. I was not alone, but I did not recognize any of the other people who were skating around. I went through my whole repertoire of jumps, spires, and steps-some of which I can do and some of which I'm not yet sure of. They were all executed flawlessly-some I repeated, some I did only once. I seemed to know that if I went into competition, I would be sure of coming in third because there were only three contestants. Up to that time I hadn't considered it because I hadn't thought I was good enough, but now since everything was going so well, I decided to enter."],
|
| 107 |
+
["I was talking on the telephone to the father of an old friend of mine (boy, 21 years old). We were discussing the party the Saturday night before to which I had invited his son as a guest. I asked him if his son had a good time at the party. He told me not to tell his son that he had told me, but that he had had a good time, except he was a little surprised that I had acted the way I did."],
|
| 108 |
+
["I was walking alone with my dog in a forest."]
|
| 109 |
+
],
|
| 110 |
+
title=title,
|
| 111 |
+
description=description_R,
|
| 112 |
+
cache_examples=True,
|
| 113 |
+
)
|
| 114 |
|
| 115 |
# interface_model_NER = gr.Interface.load(
|
| 116 |
# "models/DReAMy-lib/t5-base-DreamBank-Generation-NER-Char",
|
|
|
|
| 119 |
# )
|
| 120 |
|
| 121 |
gr.TabbedInterface(
|
| 122 |
+
[interface_words, interface_model_RE],
|
| 123 |
+
["Main","RE"],
|
| 124 |
).launch()
|