File size: 323 Bytes
45e64e0
 
 
3c2a2e2
45e64e0
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
from transformers import pipeline as pl
import gradio as gr

oracle = pl("text-classification")

def pipe(text: str):
    return oracle(text)

def main():
    interface = gr.Interface(pipe, gr.Textbox(label="Prompt"), gr.Textbox(label="Response"), title="Text Classifier")

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