Spaces:
Runtime error
Runtime error
Furkan Akkurt
commited on
Commit
·
2adfb1c
1
Parent(s):
cca1792
update app
Browse files
app.py
CHANGED
@@ -6,14 +6,19 @@ def tokenize(Sentence):
|
|
6 |
response = bap_preprocessing.tokenize(Sentence)
|
7 |
return response
|
8 |
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
|
|
|
|
|
|
|
|
|
|
19 |
demo.launch()
|
|
|
6 |
response = bap_preprocessing.tokenize(Sentence)
|
7 |
return response
|
8 |
|
9 |
+
with gr.Blocks() as demo:
|
10 |
+
gr.Markdown(
|
11 |
+
"""
|
12 |
+
# Tokenizer
|
13 |
+
"""
|
14 |
+
)
|
15 |
+
input_s = gr.Textbox(placeholder="Sentence to be tokenized.", label="Sentence")
|
16 |
+
output = gr.Textbox(label="Tokens")
|
17 |
+
submit = gr.Button(text="Tokenize")
|
18 |
+
submit.click(fn=tokenize, inputs=input_s, outputs=output)
|
19 |
+
examples = gr.Examples([
|
20 |
+
"Ben oraya geliyorum.",
|
21 |
+
"Sen neden gelmiyorsun?"
|
22 |
+
], inputs=input_s)
|
23 |
+
|
24 |
demo.launch()
|