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()