Spaces:
Runtime error
Enable Space CI
Browse filesThis PR enables Space CI on your Space. **Gradio Space CI is a tool to create ephemeral Spaces for each PR opened on your Space repo.** The goal is to improve developer experience by making the review process as lean as possible.
### ⚙️ How it works:
- Listens to pull requests events:
- If PR is opened => starts an ephemeral Space
- If PR is updated => updates the Space
- If PR is closed => deleted the Space
- Checks PR author:
- If trusted author => ephemeral Space is configured with variables, secrets and hardware.
- If not a trusted author => ephemeral Space is started without configuration.
- Space owners are trusted by default. Additional "trusted authors" can be configuration manually.
### ⚠️ Before merging:
1. Check that the configuration is correct. By default the Space is configured to run ephemeral Spaces on a (free) CPU instance without any secrets.
2. You must set `HF_TOKEN` as a secret in your Space settings. Token must have 'write' permission. You can create a new one in your [User settings](https://huggingface.co/settings/token).
---
This is an automated PR created with https://huggingface.co/spaces/Wauplin/gradio-space-ci.
For more details about Space CI, checkout [this page]](https://huggingface.co/spaces/Wauplin/gradio-space-ci/blob/main/README.md).
If you find any issues, please report here: https://huggingface.co/spaces/Wauplin/gradio-space-ci/discussions
Feel free to ignore this PR.
- README.md +9 -4
- app.py +6 -0
- requirements.txt +2 -0
|
@@ -1,11 +1,16 @@
|
|
| 1 |
---
|
| 2 |
-
tags: [opengpt]
|
| 3 |
title: OpenGPT
|
| 4 |
-
colorFrom: red
|
| 5 |
-
colorTo: purple
|
| 6 |
sdk: gradio
|
| 7 |
sdk_version: 4.5.0
|
| 8 |
app_file: app.py
|
| 9 |
-
pinned: false
|
| 10 |
license: apache-2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
---
|
|
|
|
| 1 |
---
|
|
|
|
| 2 |
title: OpenGPT
|
|
|
|
|
|
|
| 3 |
sdk: gradio
|
| 4 |
sdk_version: 4.5.0
|
| 5 |
app_file: app.py
|
|
|
|
| 6 |
license: apache-2.0
|
| 7 |
+
tags:
|
| 8 |
+
- opengpt
|
| 9 |
+
colorFrom: red
|
| 10 |
+
colorTo: purple
|
| 11 |
+
pinned: false
|
| 12 |
+
space_ci:
|
| 13 |
+
trusted_authors: []
|
| 14 |
+
secrets: []
|
| 15 |
+
hardware: cpu-basic
|
| 16 |
---
|
|
@@ -6,6 +6,12 @@ import gradio as gr
|
|
| 6 |
import os
|
| 7 |
import requests
|
| 8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
zephyr_7b_beta = "https://api-inference.huggingface.co/models/HuggingFaceH4/zephyr-7b-beta/"
|
| 10 |
|
| 11 |
HF_TOKEN = os.getenv("HF_TOKEN")
|
|
|
|
| 6 |
import os
|
| 7 |
import requests
|
| 8 |
|
| 9 |
+
from gradio_space_ci import enable_space_ci
|
| 10 |
+
|
| 11 |
+
enable_space_ci()
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
|
| 15 |
zephyr_7b_beta = "https://api-inference.huggingface.co/models/HuggingFaceH4/zephyr-7b-beta/"
|
| 16 |
|
| 17 |
HF_TOKEN = os.getenv("HF_TOKEN")
|
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
gradio-space-ci @ git+https://huggingface.co/spaces/Wauplin/gradio-space-ci@0.2.1
|