mcp-gradio-test / app.py
ritikjain51's picture
Create app.py
6b5d364 verified
raw
history blame contribute delete
448 Bytes
import gradio as gr
from sentiment_tools import analyze_sentiment
demo = gr.Interface(fn=analyze_sentiment,
inputs=gr.Textbox(placeholder="Enter text to analyze..."),
outputs=gr.JSON(),
title="Sentiment Analysis",
description="Enter text to analyze its sentiment.")
if __name__ == "__main__":
# Launch the Gradio UI for sentiment analysis
demo.launch(mcp_server=True)