Spaces:
Sleeping
Sleeping
Ludek Matyska
commited on
Commit
·
22cc337
1
Parent(s):
cb34281
feat: basic mcp app
Browse files- README.md +1 -0
- app.py +24 -0
- requirements.txt +1 -0
README.md
CHANGED
@@ -7,6 +7,7 @@ sdk: gradio
|
|
7 |
sdk_version: 5.33.0
|
8 |
app_file: app.py
|
9 |
pinned: false
|
|
|
10 |
---
|
11 |
|
12 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
7 |
sdk_version: 5.33.0
|
8 |
app_file: app.py
|
9 |
pinned: false
|
10 |
+
tags: ["mcp-server-track"]
|
11 |
---
|
12 |
|
13 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
app.py
ADDED
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
|
3 |
+
def get_theory():
|
4 |
+
"""
|
5 |
+
This function is a placeholder for the actual logic that would analyze the input text
|
6 |
+
and return relevant information about quantum circuits.
|
7 |
+
"""
|
8 |
+
return {
|
9 |
+
"message": "This is a placeholder response. Implement your logic here.",
|
10 |
+
"status": "success"
|
11 |
+
}
|
12 |
+
|
13 |
+
# Create the Gradio interface
|
14 |
+
demo = gr.Interface(
|
15 |
+
fn=get_theory,
|
16 |
+
inputs=gr.Textbox(placeholder="Enter text to analyze..."),
|
17 |
+
outputs=gr.JSON(),
|
18 |
+
title="Quantum circuits learning programme",
|
19 |
+
description="Learn about quantum circuits through this interactive chatbot.",
|
20 |
+
)
|
21 |
+
|
22 |
+
# Launch the interface and MCP server
|
23 |
+
if __name__ == "__main__":
|
24 |
+
demo.launch(mcp_server=True)
|
requirements.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
gradio[mcp]
|