Victoria Slocum commited on
Commit
2d3407c
1 Parent(s): 0c1cf8c

fix: tab box

Browse files
Files changed (1) hide show
  1. app.py +27 -29
app.py CHANGED
@@ -33,7 +33,6 @@ def get_all_models():
33
  models.append(model)
34
  return models
35
 
36
-
37
  models = get_all_models()
38
 
39
  def download_svg(svg):
@@ -202,34 +201,33 @@ with demo:
202
  gr.Markdown("")
203
 
204
  button = gr.Button("Generate", variant="primary")
205
- with gr.Tabs():
206
- with gr.TabItem(""):
207
- with gr.Column():
208
- gr.Markdown(
209
- "## [Dependency Parser](https://spacy.io/usage/visualizers#dep)")
210
- gr.Markdown(
211
- "The dependency visualizer shows part-of-speech tags and syntactic dependencies.")
212
- with gr.Row():
213
- with gr.Column():
214
- col_punct = gr.Checkbox(
215
- label="Collapse Punctuation", value=True)
216
- col_phrase = gr.Checkbox(
217
- label="Collapse Phrases", value=True)
218
- compact = gr.Checkbox(label="Compact", value=False)
219
- with gr.Column():
220
- bg = gr.Textbox(
221
- label="Background Color", value=DEFAULT_COLOR)
222
- with gr.Column():
223
- text = gr.Textbox(
224
- label="Text Color", value="black")
225
-
226
- depen_output = gr.HTML(value=dependency(
227
- DEFAULT_TEXT, True, True, False, DEFAULT_COLOR, "black", DEFAULT_MODEL)[0])
228
- with gr.Row():
229
- with gr.Column():
230
- dep_button = gr.Button("Generate Dependency Parser", variant="primary")
231
- with gr.Column():
232
- dep_download_button = gr.HTML(value=download_svg(depen_output.value))
233
 
234
 
235
 
 
33
  models.append(model)
34
  return models
35
 
 
36
  models = get_all_models()
37
 
38
  def download_svg(svg):
 
201
  gr.Markdown("")
202
 
203
  button = gr.Button("Generate", variant="primary")
204
+ with gr.Box():
205
+ with gr.Column():
206
+ gr.Markdown(
207
+ "## [Dependency Parser](https://spacy.io/usage/visualizers#dep)")
208
+ gr.Markdown(
209
+ "The dependency visualizer shows part-of-speech tags and syntactic dependencies.")
210
+ with gr.Row():
211
+ with gr.Column():
212
+ col_punct = gr.Checkbox(
213
+ label="Collapse Punctuation", value=True)
214
+ col_phrase = gr.Checkbox(
215
+ label="Collapse Phrases", value=True)
216
+ compact = gr.Checkbox(label="Compact", value=False)
217
+ with gr.Column():
218
+ bg = gr.Textbox(
219
+ label="Background Color", value=DEFAULT_COLOR)
220
+ with gr.Column():
221
+ text = gr.Textbox(
222
+ label="Text Color", value="black")
223
+
224
+ depen_output = gr.HTML(value=dependency(
225
+ DEFAULT_TEXT, True, True, False, DEFAULT_COLOR, "black", DEFAULT_MODEL)[0])
226
+ with gr.Row():
227
+ with gr.Column():
228
+ dep_button = gr.Button("Generate Dependency Parser", variant="primary")
229
+ with gr.Column():
230
+ dep_download_button = gr.HTML(value=download_svg(depen_output.value))
 
231
 
232
 
233