mao / app.py
Jira's picture
Update app.py
9a049af
raw
history blame
512 Bytes
import gradio as gr
#from transformers import AutoTokenizer
from transformers import pipeline
def greet(name):
#tokenizer = AutoTokenizer.from_pretrained("KoichiYasuoka/roberta-base-thai-char-upos")
#t = tokenizer.tokenize(name)
translator = pipeline("translation_en_to_de")
text = "Hello world! Hugging Face is the best NLP tool."
return translator(text)
#return "Hello ครับ คุณ" + name + "! "
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
iface.launch()