Spaces:
Runtime error
Runtime error
File size: 586 Bytes
d827478 629a40f d827478 629a40f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
import gradio as gr
from transformers import pipeline
pipe = pipeline("text-classification", model="nickprock/distilbert-base-uncased-banking77-classification")
def greet(text):
response = pipe(text)
return response[0]['label']
demo = gr.Interface(fn=greet,
inputs="text",
outputs="text",
theme="huggingface",
title="Banking Intent Classifier",
description="Try to classify customer queries",
examples=[["I can't pay by my credit card"],["The amount on the transfer is wrong can I cancel it?"], "My card still hasn't been delivered "],
share=True)
demo.launch() |