Spaces:
Sleeping
Sleeping
| import gradio as gr | |
| from transformers import pipeline | |
| pipe = pipeline("text-classification", model="mrm8488/distilroberta-finetuned-financial-news-sentiment-analysis") | |
| def text_classification(prompt): | |
| pro = pipe(prompt) | |
| return pro | |
| title = "Enter your Prompt" | |
| description = """ | |
| # This is Fine-tuned BERT based Financial sentiment analysis Model | |
| <img src = "https://upload.wikimedia.org/wikipedia/commons/2/2f/Google_2015_logo.svg" width=300px> | |
| """ | |
| gr.Interface( fn = text_classification, | |
| inputs = gr.Textbox(), | |
| outputs= gr.Textbox() , | |
| title=title, | |
| description=description, | |
| ).launch() | |