File size: 480 Bytes
db49918
 
c52adb8
db49918
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import gradio as gr
from sentiment_analysis import sentiment_analysis_tool

# Version: 1.1.5 - Fixed deprecated transformers.tools import
iface = gr.Interface(
    fn=sentiment_analysis_tool.predicto,
    inputs=gr.Textbox(lines=3, label="Enter text to analyze"),
    outputs=gr.Label(label="Sentiment Analysis Results"),
    title="Sentiment Analysis Tool",
    description="Analyzes the sentiment of text using DistilBERT model"
)

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