Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
|
| 3 |
+
def get_headers(name: str, request: gr.Request) -> str:
|
| 4 |
+
|
| 5 |
+
return f"Hello, {name}! Your x-gradio-user is {request.headers.get('x-gradio-user', 'not provided')}"
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
gr.Interface(get_headers, "text", "text").launch(mcp_server=True)
|