saicharan2804 commited on
Commit
f0c3735
1 Parent(s): 0e69d31

Fixed error

Browse files
Files changed (1) hide show
  1. app.py +17 -3
app.py CHANGED
@@ -1,9 +1,23 @@
1
  import gradio as gr
2
  from KmerTokenizer import kmer_tokenizer
3
 
4
- def tem(name, num =3):
5
- return name*num
6
 
7
 
8
- iface = gr.Interface(fn=tem, inputs=["text", "text"], outputs="text")
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  iface.launch()
 
 
1
  import gradio as gr
2
  from KmerTokenizer import kmer_tokenizer
3
 
4
+ # def tem(name, num = 3):
5
+ # return name + num
6
 
7
 
8
+ # iface = gr.Interface(fn=tem, inputs=["text", "text"], outputs="text")
9
+
10
+ iface = gr.Interface(
11
+ fn=gradio_kmer_tokenizer,
12
+ inputs=[
13
+ gr.Textbox(label="SMILES"),
14
+ gr.Number(label="ngram", default=4, step=1),
15
+ gr.Number(label="stride", default=1, step=1),
16
+ gr.Checkbox(label="Remove Last", default=False),
17
+ gr.Textbox(label="Exclusive Tokens (comma-separated)", default="", optional=True)
18
+ ],
19
+ outputs="text"
20
+ )
21
+
22
  iface.launch()
23
+