Spaces:
Runtime error
Runtime error
Commit ·
df746fa
0
Parent(s):
init: minimal gradio space
Browse files- README.md +21 -0
- app.py +17 -0
- requirements.txt +1 -0
README.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: OpenClaw Hello
|
| 3 |
+
tags:
|
| 4 |
+
- gradio
|
| 5 |
+
- openclaw
|
| 6 |
+
- demo
|
| 7 |
+
sdk: gradio
|
| 8 |
+
sdk_version: 4.44.1
|
| 9 |
+
app_file: app.py
|
| 10 |
+
pinned: false
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# OpenClaw Hello
|
| 14 |
+
|
| 15 |
+
A tiny Gradio Space to make this account "not empty"—and to serve as a quick deployment sanity check.
|
| 16 |
+
|
| 17 |
+
## Run locally
|
| 18 |
+
|
| 19 |
+
```bash
|
| 20 |
+
python3 app.py
|
| 21 |
+
```
|
app.py
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
def greet(name: str):
|
| 5 |
+
name = (name or "").strip() or "world"
|
| 6 |
+
return f"Hello, {name}!"
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
with gr.Blocks(title="OpenClaw Hello") as demo:
|
| 10 |
+
gr.Markdown("# OpenClaw Hello\nA minimal Gradio Space.")
|
| 11 |
+
name = gr.Textbox(label="Your name", placeholder="Type a name...")
|
| 12 |
+
out = gr.Textbox(label="Output")
|
| 13 |
+
btn = gr.Button("Greet")
|
| 14 |
+
btn.click(greet, inputs=name, outputs=out)
|
| 15 |
+
|
| 16 |
+
if __name__ == "__main__":
|
| 17 |
+
demo.launch(server_name="0.0.0.0", server_port=7860)
|
requirements.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
gradio==4.44.1
|