Update app.py
Browse files
app.py
CHANGED
@@ -41,8 +41,8 @@ if __name__ == "__main__":
|
|
41 |
os.system(f"echo ls -al /app/: && ls -al /app/")
|
42 |
os.system(f"echo ls -al /home/: && ls -al /home/")
|
43 |
|
44 |
-
# Create the Gradio interface
|
45 |
-
|
46 |
fn = func_SentimentAnalysis,
|
47 |
inputs = gr.Textbox(placeholder="Enter text to analyze..."),
|
48 |
outputs = gr.JSON(),
|
@@ -57,7 +57,7 @@ if __name__ == "__main__":
|
|
57 |
# export GRADIO_MCP_SERVER=True # http://localhost:7860/gradio_api/mcp/sse
|
58 |
# https://allillusion-mcp-sentimentanalysis.hf.space/gradio_api/mcp/sse
|
59 |
|
60 |
-
|
61 |
|
62 |
# os.system(f"echo ls -al /app/flagged/: && ls -al /app/flagged/")
|
63 |
# os.system(f"echo ls -al /.gradio/flagged/: && ls -al /.gradio/flagged/")
|
|
|
41 |
os.system(f"echo ls -al /app/: && ls -al /app/")
|
42 |
os.system(f"echo ls -al /home/: && ls -al /home/")
|
43 |
|
44 |
+
# Create the Gradio interface, as the MCP-Server
|
45 |
+
grInterface_SentimentAnalysis__MCP_Server = gr.Interface(
|
46 |
fn = func_SentimentAnalysis,
|
47 |
inputs = gr.Textbox(placeholder="Enter text to analyze..."),
|
48 |
outputs = gr.JSON(),
|
|
|
57 |
# export GRADIO_MCP_SERVER=True # http://localhost:7860/gradio_api/mcp/sse
|
58 |
# https://allillusion-mcp-sentimentanalysis.hf.space/gradio_api/mcp/sse
|
59 |
|
60 |
+
grInterface_SentimentAnalysis__MCP_Server.launch(mcp_server=True, share=True)
|
61 |
|
62 |
# os.system(f"echo ls -al /app/flagged/: && ls -al /app/flagged/")
|
63 |
# os.system(f"echo ls -al /.gradio/flagged/: && ls -al /.gradio/flagged/")
|