Spaces:
Runtime error
Runtime error
Victoria Slocum
commited on
Commit
·
c498800
1
Parent(s):
a83d8ed
dependency update
Browse files
app.py
CHANGED
@@ -169,6 +169,15 @@ with demo:
|
|
169 |
with gr.Column():
|
170 |
gr.Markdown("## [Dependency Parser](https://spacy.io/usage/visualizers#dep)")
|
171 |
with gr.Row():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
172 |
with gr.Column():
|
173 |
col_punct = gr.Checkbox(label="Collapse Punctuation", value=True)
|
174 |
col_phrase = gr.Checkbox(label="Collapse Phrases", value=True)
|
@@ -177,14 +186,25 @@ with demo:
|
|
177 |
bg = gr.Textbox(label="Background Color", value=DEFAULT_COLOR)
|
178 |
with gr.Column():
|
179 |
text = gr.Textbox(label="Text Color", value="black")
|
180 |
-
with gr.Column():
|
181 |
-
gr.Markdown("")
|
182 |
depen_output = gr.HTML(value=dependency(DEFAULT_TEXT, True, True, False, DEFAULT_COLOR, "black", DEFAULT_MODEL))
|
183 |
dep_button = gr.Button("Generate Dependency Parser")
|
184 |
gr.Markdown("\n\n\n")
|
185 |
with gr.Box():
|
186 |
with gr.Column():
|
187 |
gr.Markdown("## [Entity Recognizer](https://spacy.io/usage/visualizers#ent)")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
188 |
entity_input = gr.CheckboxGroup(DEFAULT_ENTS, value=DEFAULT_ENTS)
|
189 |
entity_output = gr.HTML(value=entity(DEFAULT_TEXT, DEFAULT_ENTS, DEFAULT_MODEL))
|
190 |
ent_button = gr.Button("Generate Entity Recognizer")
|
|
|
169 |
with gr.Column():
|
170 |
gr.Markdown("## [Dependency Parser](https://spacy.io/usage/visualizers#dep)")
|
171 |
with gr.Row():
|
172 |
+
with gr.Column():
|
173 |
+
gr.Markdown("""```python
|
174 |
+
import spacy
|
175 |
+
from spacy import displacy
|
176 |
+
|
177 |
+
displacy.serve(doc, style="dep")
|
178 |
+
```
|
179 |
+
""")
|
180 |
+
|
181 |
with gr.Column():
|
182 |
col_punct = gr.Checkbox(label="Collapse Punctuation", value=True)
|
183 |
col_phrase = gr.Checkbox(label="Collapse Phrases", value=True)
|
|
|
186 |
bg = gr.Textbox(label="Background Color", value=DEFAULT_COLOR)
|
187 |
with gr.Column():
|
188 |
text = gr.Textbox(label="Text Color", value="black")
|
|
|
|
|
189 |
depen_output = gr.HTML(value=dependency(DEFAULT_TEXT, True, True, False, DEFAULT_COLOR, "black", DEFAULT_MODEL))
|
190 |
dep_button = gr.Button("Generate Dependency Parser")
|
191 |
gr.Markdown("\n\n\n")
|
192 |
with gr.Box():
|
193 |
with gr.Column():
|
194 |
gr.Markdown("## [Entity Recognizer](https://spacy.io/usage/visualizers#ent)")
|
195 |
+
with gr.Column():
|
196 |
+
with gr.Row():
|
197 |
+
gr.Markdown("""```python
|
198 |
+
import spacy
|
199 |
+
from spacy import displacy
|
200 |
+
|
201 |
+
displacy.serve(doc, style="ent")
|
202 |
+
```
|
203 |
+
""")
|
204 |
+
with gr.Row():
|
205 |
+
gr.Markdown("")
|
206 |
+
with gr.Row():
|
207 |
+
gr.Markdown("")
|
208 |
entity_input = gr.CheckboxGroup(DEFAULT_ENTS, value=DEFAULT_ENTS)
|
209 |
entity_output = gr.HTML(value=entity(DEFAULT_TEXT, DEFAULT_ENTS, DEFAULT_MODEL))
|
210 |
ent_button = gr.Button("Generate Entity Recognizer")
|