Spaces:
Sleeping
Sleeping
Create app.py
Browse files
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)
|