File size: 307 Bytes
31a7455
5d00e2d
31a7455
656c4ee
a01581e
d688851
c7102bb
72eacc1
31a7455
a01581e
31a7455
1
2
3
4
5
6
7
8
9
10
11
12
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()