eCiu commited on
Commit
8fe862f
·
verified ·
1 Parent(s): c747725

Deploy Gradio MCP app

Browse files
Files changed (2) hide show
  1. app.py +17 -0
  2. requirements.txt +2 -0
app.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ def my_tool(input_text: str) -> str:
4
+ """Do something with input.
5
+
6
+ Args:
7
+ input_text: The input
8
+
9
+ Returns:
10
+ The result
11
+ """
12
+ return f"Processed: {input_text}"
13
+
14
+ demo = gr.Interface(fn=my_tool, inputs="text", outputs="text")
15
+
16
+ if __name__ == "__main__":
17
+ demo.launch(mcp_server=True)
requirements.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ gradio>=4.0.0
2
+ requests>=2.28.0