ritikjain51 commited on
Commit
6b5d364
·
verified ·
1 Parent(s): 2ef9bf7

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -0
app.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ from sentiment_tools import analyze_sentiment
4
+
5
+ demo = gr.Interface(fn=analyze_sentiment,
6
+ inputs=gr.Textbox(placeholder="Enter text to analyze..."),
7
+ outputs=gr.JSON(),
8
+ title="Sentiment Analysis",
9
+ description="Enter text to analyze its sentiment.")
10
+ if __name__ == "__main__":
11
+ # Launch the Gradio UI for sentiment analysis
12
+ demo.launch(mcp_server=True)