Furkan Akkurt commited on
Commit
2adfb1c
·
1 Parent(s): cca1792

update app

Browse files
Files changed (1) hide show
  1. app.py +15 -10
app.py CHANGED
@@ -6,14 +6,19 @@ def tokenize(Sentence):
6
  response = bap_preprocessing.tokenize(Sentence)
7
  return response
8
 
9
- demo = gr.Interface(
10
- fn=tokenize,
11
- inputs="text",
12
- outputs="text",
13
- title="Tokenizer",
14
- examples=[
15
- "Ben oraya geliyorum.",
16
- "Sen neden gelmiyorsun?"
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()