File size: 392 Bytes
dda6f86
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import gradio as gr
from distilabel import DistilAbel

distilabel = DistilAbel(model_name="distilbert-base-uncased")

def label_text(text):
    labels = distilabel.label(text)
    return labels

iface = gr.Interface(
    fn=label_text,
    inputs="text",
    outputs="text",
    title="Distilabel Demo",
    description="Enter text to label:"
)

if __name__ == "__main__":
    iface.launch()