llms_compare / app.py
Farsi, Ali
dev
83c002a
raw
history blame
337 Bytes
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)
def greet(name):
return "Hello " + name + "!!"
iface = gr.Interface(fn=greet, inputs="text", outputs=res)
iface.launch()