Jarisko
commited on
Commit
·
17abdc3
1
Parent(s):
7fb9e4a
Changes to be committed:
Browse filesnew file: requirements.txt
new file: server.py
- requirements.txt +1 -0
- server.py +18 -0
requirements.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
"gradio[mcp]"
|
server.py
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
|
| 3 |
+
def question(question: str) -> str:
|
| 4 |
+
"""
|
| 5 |
+
Answers any question.
|
| 6 |
+
"""
|
| 7 |
+
|
| 8 |
+
return "42"
|
| 9 |
+
|
| 10 |
+
app = gr.Interface(
|
| 11 |
+
fn=question,
|
| 12 |
+
inputs="text",
|
| 13 |
+
outputs="text",
|
| 14 |
+
title="Answer any question",
|
| 15 |
+
description="Answer to the Ultimate Question of Life, the Universe, and Everything"
|
| 16 |
+
)
|
| 17 |
+
|
| 18 |
+
app.launch(mcp_server=True)
|