File size: 350 Bytes
ec8a922
83c002a
 
 
 
 
 
c89f2ed
ec8a922
 
 
c89f2ed
83c002a
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import gradio as gr
from transformers import AutoTokenizer

tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")

sequence = "In a hole in the ground there lived a hobbit."
res = tokenizer(sequence)
print(res)
def greet(name):
    return "Hello " + name + "!!"

iface = gr.Interface(fn=greet, inputs="text", outputs="test")
iface.launch()