frankrobotics's picture
Create app.py
50ca8c0 verified
raw
history blame
389 Bytes
import gr from gradio
import json
from transformers import pipeline
classifier = pipeline("zero-shot-classification", model="facebook/bart-large-mnli")
def tagging(
input: str,
tags: tuple[str]
):
text = json.loads(str)
return text;
app = gr.Interface(fn=tagging, inputs=[
gr.Textbox(label="Your input here"),
gr.Textbox(label="Your input here")
], outputs="text")
app.launch()