wendys-llc's picture
Update app.py
d688851
raw
history blame
No virus
307 Bytes
import gradio as gr
from transformers import pipeline
def do_action(text):
pipe = pipeline("text-classification", model="papluca/xlm-roberta-base-language-detection")
result = pipe(text, top_k=10)
return result
iface = gr.Interface(fn=do_action, inputs="text", outputs="text")
iface.launch()