File size: 554 Bytes
2918cfd
8975cfc
2918cfd
f0c3735
 
2918cfd
2cc9210
f0c3735
 
 
4ccf75e
f0c3735
 
9089432
 
 
 
f0c3735
4d8cc2b
f0c3735
 
2918cfd
f0c3735
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import gradio as gr
from KmerTokenizer import kmer_tokenizer

# def tem(name, num = 3):
#     return name + num


# iface = gr.Interface(fn=tem, inputs=["text", "text"], outputs="text")

iface = gr.Interface(
    fn = kmer_tokenizer,
    inputs=[
        gr.Textbox(label="SMILES"), 
        gr.Number(label="ngram", value=4),
        gr.Number(label="stride", value=1),
        gr.Checkbox(label="Remove Last", value=False),
        gr.Textbox(label="Exclusive Tokens (comma-separated)", value="")
    ],
    outputs=["text", "text"]
)

iface.launch()