update app.py for gradio 4.36.0
Browse files
README.md
CHANGED
@@ -4,7 +4,7 @@ emoji: π
|
|
4 |
colorFrom: pink
|
5 |
colorTo: red
|
6 |
sdk: gradio
|
7 |
-
sdk_version:
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
license: mit
|
|
|
4 |
colorFrom: pink
|
5 |
colorTo: red
|
6 |
sdk: gradio
|
7 |
+
sdk_version: 4.36.0
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
license: mit
|
app.py
CHANGED
@@ -2,7 +2,7 @@ import gradio as gr
|
|
2 |
from toiro import tokenizers
|
3 |
|
4 |
num_input_lines = 3
|
5 |
-
default_text = "γγγ«γγγΉγγε
₯εγγ
|
6 |
title = "Japanese Tokenizer Comparison"
|
7 |
description = """
|
8 |
This is a demo comparing Japanese tokenizers. You can compare the tokenization results of tools that are available with just a `pip install` in Python.
|
@@ -65,7 +65,7 @@ def tokenize(text):
|
|
65 |
|
66 |
iface = gr.Interface(
|
67 |
fn=tokenize,
|
68 |
-
inputs=gr.
|
69 |
label="Input text",
|
70 |
lines=num_input_lines,
|
71 |
default=default_text,
|
@@ -74,13 +74,14 @@ iface = gr.Interface(
|
|
74 |
description=description,
|
75 |
article=article,
|
76 |
outputs=[
|
77 |
-
gr.
|
78 |
-
gr.
|
79 |
-
gr.
|
80 |
-
gr.
|
81 |
-
gr.
|
82 |
-
gr.
|
83 |
],
|
|
|
84 |
)
|
85 |
|
86 |
|
|
|
2 |
from toiro import tokenizers
|
3 |
|
4 |
num_input_lines = 3
|
5 |
+
default_text = "γγγ«γγγΉγγε
₯εγγEnter γζΌγγ¦γγ γγγ"
|
6 |
title = "Japanese Tokenizer Comparison"
|
7 |
description = """
|
8 |
This is a demo comparing Japanese tokenizers. You can compare the tokenization results of tools that are available with just a `pip install` in Python.
|
|
|
65 |
|
66 |
iface = gr.Interface(
|
67 |
fn=tokenize,
|
68 |
+
inputs=gr.Textbox(
|
69 |
label="Input text",
|
70 |
lines=num_input_lines,
|
71 |
default=default_text,
|
|
|
74 |
description=description,
|
75 |
article=article,
|
76 |
outputs=[
|
77 |
+
gr.Textbox(label="Janome"),
|
78 |
+
gr.Textbox(label="nagisa"),
|
79 |
+
gr.Textbox(label="sudachi.rs"),
|
80 |
+
gr.Textbox(label="mecab-python3"),
|
81 |
+
gr.Textbox(label="fugashi_ipadic"),
|
82 |
+
gr.Textbox(label="fugashi_unidic"),
|
83 |
],
|
84 |
+
live=True,
|
85 |
)
|
86 |
|
87 |
|