Spaces:
Runtime error
Runtime error
Victoria Slocum
commited on
Commit
•
62344c1
1
Parent(s):
eb32d8b
fix button
Browse files
app.py
CHANGED
@@ -20,7 +20,7 @@ texts = {"en": DEFAULT_TEXT, "ca": "Apple està buscant comprar una startup del
|
|
20 |
"ja": "アップルがイギリスの新興企業を10億ドルで購入を検討", "ko": "애플이 영국의 스타트업을 10억 달러에 인수하는 것을 알아보고 있다.", "lt": "Jaunikis pirmąją vestuvinę naktį iškeitė į areštinės gultą", "nb": "Apple vurderer å kjøpe britisk oppstartfirma for en milliard dollar.", "nl": "Apple overweegt om voor 1 miljard een U.K. startup te kopen",
|
21 |
"pl": "Poczuł przyjemną woń mocnej kawy.", "pt": "Apple está querendo comprar uma startup do Reino Unido por 100 milhões de dólares", "ro": "Apple plănuiește să cumpere o companie britanică pentru un miliard de dolari", "ru": "Apple рассматривает возможность покупки стартапа из Соединённого Королевства за $1 млрд", "sv": "Apple överväger att köpa brittisk startup för 1 miljard dollar.", "zh": "作为语言而言,为世界使用人数最多的语言,目前世界有五分之一人口做为母语。"}
|
22 |
|
23 |
-
button_css = "--tw-border-opacity: 1; border-color: rgb(
|
24 |
|
25 |
def get_all_models():
|
26 |
with open("requirements.txt") as f:
|
@@ -227,7 +227,7 @@ with demo:
|
|
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("
|
231 |
with gr.Column():
|
232 |
dep_download_button = gr.HTML(value=download_svg(depen_output.value))
|
233 |
with gr.Column():
|
@@ -248,10 +248,10 @@ with demo:
|
|
248 |
DEFAULT_ENTS, value=DEFAULT_ENTS)
|
249 |
ent_output = gr.HTML(value=entity(
|
250 |
DEFAULT_TEXT, DEFAULT_ENTS, DEFAULT_MODEL))
|
251 |
-
ent_button = gr.Button("
|
252 |
# with gr.Row():
|
253 |
# with gr.Column():
|
254 |
-
# ent_button = gr.Button("
|
255 |
# with gr.Column():
|
256 |
# ent_download_button = gr.HTML(value=download_svg(ent_output.value))
|
257 |
# with gr.Column():
|
@@ -272,7 +272,7 @@ with demo:
|
|
272 |
gr.Markdown("")
|
273 |
tok_output = gr.Dataframe(headers=DEFAULT_TOK_ATTR, value=default_token(
|
274 |
DEFAULT_TEXT, DEFAULT_TOK_ATTR, DEFAULT_MODEL), overflow_row_behaviour="paginate")
|
275 |
-
tok_button = gr.Button("
|
276 |
with gr.Box():
|
277 |
with gr.Column():
|
278 |
gr.Markdown(
|
@@ -292,7 +292,7 @@ with demo:
|
|
292 |
with gr.Column():
|
293 |
gr.Markdown("")
|
294 |
sim_random_button = gr.Button("Generate random words")
|
295 |
-
sim_button = gr.Button("
|
296 |
with gr.Box():
|
297 |
with gr.Column():
|
298 |
gr.Markdown(
|
@@ -324,10 +324,10 @@ with demo:
|
|
324 |
gr.Markdown("")
|
325 |
span_output = gr.HTML(value=span(
|
326 |
DEFAULT_TEXT, "U.K. startup", "U.K.", "ORG", "GPE", DEFAULT_MODEL))
|
327 |
-
span_button = gr.Button("
|
328 |
# with gr.Row():
|
329 |
# with gr.Column():
|
330 |
-
# span_button = gr.Button("
|
331 |
# with gr.Column():
|
332 |
# span_download_button = gr.HTML(value=download_svg(span_output.value))
|
333 |
# with gr.Column():
|
|
|
20 |
"ja": "アップルがイギリスの新興企業を10億ドルで購入を検討", "ko": "애플이 영국의 스타트업을 10억 달러에 인수하는 것을 알아보고 있다.", "lt": "Jaunikis pirmąją vestuvinę naktį iškeitė į areštinės gultą", "nb": "Apple vurderer å kjøpe britisk oppstartfirma for en milliard dollar.", "nl": "Apple overweegt om voor 1 miljard een U.K. startup te kopen",
|
21 |
"pl": "Poczuł przyjemną woń mocnej kawy.", "pt": "Apple está querendo comprar uma startup do Reino Unido por 100 milhões de dólares", "ro": "Apple plănuiește să cumpere o companie britanică pentru un miliard de dolari", "ru": "Apple рассматривает возможность покупки стартапа из Соединённого Королевства за $1 млрд", "sv": "Apple överväger att köpa brittisk startup för 1 miljard dollar.", "zh": "作为语言而言,为世界使用人数最多的语言,目前世界有五分之一人口做为母语。"}
|
22 |
|
23 |
+
button_css = "--tw-border-opacity: 1; border-color: rgb(229 231 235 / var(--tw-border-opacity)); --tw-gradient-from: rgb(243 244 246 / 0.7); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgb(243 244 246 / 0)); --tw-gradient-to: rgb(229 231 235 / 0.8); --tw-text-opacity: 1; color: rgb(55 65 81 / var(--tw-text-opacity)); border-width: 1px; --tw-bg-opacity: 1; background-color: rgb(255 255 255 / var(--tw-bg-opacity)); background-image: linear-gradient(to bottom right, var(--tw-gradient-stops)); display: inline-flex; flex: 1 1 0%; align-items: center; justify-content: center; --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color); box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow); -webkit-appearance: button; border-radius: 0.5rem; padding-top: 0.5rem; padding-bottom: 0.5rem; padding-left: 1rem; padding-right: 1rem; font-size: 1rem; line-height: 1.5rem; font-weight: 600; margin-top: 0.75rem;"
|
24 |
|
25 |
def get_all_models():
|
26 |
with open("requirements.txt") as f:
|
|
|
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 |
with gr.Column():
|
|
|
248 |
DEFAULT_ENTS, value=DEFAULT_ENTS)
|
249 |
ent_output = gr.HTML(value=entity(
|
250 |
DEFAULT_TEXT, DEFAULT_ENTS, DEFAULT_MODEL))
|
251 |
+
ent_button = gr.Button("Generate Entity Recognizer", variant="primary")
|
252 |
# with gr.Row():
|
253 |
# with gr.Column():
|
254 |
+
# ent_button = gr.Button("Generate Entity Recognizer", variant="primary")
|
255 |
# with gr.Column():
|
256 |
# ent_download_button = gr.HTML(value=download_svg(ent_output.value))
|
257 |
# with gr.Column():
|
|
|
272 |
gr.Markdown("")
|
273 |
tok_output = gr.Dataframe(headers=DEFAULT_TOK_ATTR, value=default_token(
|
274 |
DEFAULT_TEXT, DEFAULT_TOK_ATTR, DEFAULT_MODEL), overflow_row_behaviour="paginate")
|
275 |
+
tok_button = gr.Button("Generate Token Properties", variant="primary")
|
276 |
with gr.Box():
|
277 |
with gr.Column():
|
278 |
gr.Markdown(
|
|
|
292 |
with gr.Column():
|
293 |
gr.Markdown("")
|
294 |
sim_random_button = gr.Button("Generate random words")
|
295 |
+
sim_button = gr.Button("Generate similarity", variant="primary")
|
296 |
with gr.Box():
|
297 |
with gr.Column():
|
298 |
gr.Markdown(
|
|
|
324 |
gr.Markdown("")
|
325 |
span_output = gr.HTML(value=span(
|
326 |
DEFAULT_TEXT, "U.K. startup", "U.K.", "ORG", "GPE", DEFAULT_MODEL))
|
327 |
+
span_button = gr.Button("Generate Spans", variant="primary")
|
328 |
# with gr.Row():
|
329 |
# with gr.Column():
|
330 |
+
# span_button = gr.Button("Generate Spans", variant="primary")
|
331 |
# with gr.Column():
|
332 |
# span_download_button = gr.HTML(value=download_svg(span_output.value))
|
333 |
# with gr.Column():
|