Spaces:
Runtime error
Runtime error
Merge branch 'main' of hf.co:spaces/Wauplin/gradio-space-ci
Browse files- README.md +1 -1
- app.py +2 -18
- requirements.txt +1 -1
README.md
CHANGED
|
@@ -42,7 +42,7 @@ Add the following line to it:
|
|
| 42 |
|
| 43 |
```bash
|
| 44 |
# requirements.txt
|
| 45 |
-
git+https://huggingface.co/spaces/Wauplin/gradio-space-ci
|
| 46 |
```
|
| 47 |
|
| 48 |
|
|
|
|
| 42 |
|
| 43 |
```bash
|
| 44 |
# requirements.txt
|
| 45 |
+
gradio-space-ci@git+https://huggingface.co/spaces/Wauplin/gradio-space-ci
|
| 46 |
```
|
| 47 |
|
| 48 |
|
app.py
CHANGED
|
@@ -4,28 +4,12 @@ from pathlib import Path
|
|
| 4 |
import gradio as gr
|
| 5 |
from gradio_space_ci import configure_space_ci
|
| 6 |
|
| 7 |
-
|
| 8 |
-
def greet(name: str) -> str:
|
| 9 |
-
return "Hello " + name + "!"
|
| 10 |
-
|
| 11 |
-
|
| 12 |
with gr.Blocks() as demo:
|
| 13 |
-
gr.Markdown("
|
| 14 |
-
name = gr.Textbox(label="Name")
|
| 15 |
-
output = gr.Textbox(label="Output Box")
|
| 16 |
-
greet_btn = gr.Button("Greet")
|
| 17 |
-
greet_btn.click(fn=greet, inputs=name, outputs=output, api_name="greet")
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
with gr.Blocks() as demo_with_readme:
|
| 21 |
-
with gr.Tab("README"):
|
| 22 |
-
gr.Markdown(Path("README.md").read_text().split("---")[-1])
|
| 23 |
-
with gr.Tab("Demo"):
|
| 24 |
-
demo.render()
|
| 25 |
|
| 26 |
if __name__ == "__main__":
|
| 27 |
configure_space_ci(
|
| 28 |
-
blocks=
|
| 29 |
trusted_authors=["clefourrier"], # space owners + manually trusted authors
|
| 30 |
private="auto", # ephemeral spaces will have same visibility as the main space. Otherwise, set to `True` or `False` explicitly.
|
| 31 |
variables="auto", # same variables as the main space. Otherwise, set to a `Dict[str, str]`.
|
|
|
|
| 4 |
import gradio as gr
|
| 5 |
from gradio_space_ci import configure_space_ci
|
| 6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
with gr.Blocks() as demo:
|
| 8 |
+
gr.Markdown(Path("README.md").read_text().split("---")[-1])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
if __name__ == "__main__":
|
| 11 |
configure_space_ci(
|
| 12 |
+
blocks=demo, # ANY gradio app
|
| 13 |
trusted_authors=["clefourrier"], # space owners + manually trusted authors
|
| 14 |
private="auto", # ephemeral spaces will have same visibility as the main space. Otherwise, set to `True` or `False` explicitly.
|
| 15 |
variables="auto", # same variables as the main space. Otherwise, set to a `Dict[str, str]`.
|
requirements.txt
CHANGED
|
@@ -1,2 +1,2 @@
|
|
| 1 |
gradio
|
| 2 |
-
git+https://huggingface.co/spaces/Wauplin/gradio-space-ci
|
|
|
|
| 1 |
gradio
|
| 2 |
+
gradio-space-ci@git+https://huggingface.co/spaces/Wauplin/gradio-space-ci
|