Spaces:
Sleeping
Sleeping
File size: 659 Bytes
288479a d1506b0 288479a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
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()
|