Wauplin HF staff commited on
Commit
ebd475c
β€’
1 Parent(s): cde05f1

Enable Space CI

Browse files

This 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.

Files changed (3) hide show
  1. README.md +10 -6
  2. app.py +6 -0
  3. requirements.txt +2 -1
README.md CHANGED
@@ -1,13 +1,17 @@
1
  ---
2
  title: TTS Arena
3
- emoji: πŸ†
4
- colorFrom: blue
5
- colorTo: blue
6
  sdk: gradio
7
  app_file: app.py
8
- pinned: true
9
  tags:
10
  - leaderboard
 
 
 
 
11
  header: mini
12
- license: zlib
13
- ---
 
 
 
 
1
  ---
2
  title: TTS Arena
 
 
 
3
  sdk: gradio
4
  app_file: app.py
5
+ license: zlib
6
  tags:
7
  - leaderboard
8
+ emoji: πŸ†
9
+ colorFrom: blue
10
+ colorTo: blue
11
+ pinned: true
12
  header: mini
13
+ space_ci:
14
+ trusted_authors: []
15
+ secrets: []
16
+ hardware: cpu-basic
17
+ ---
app.py CHANGED
@@ -14,6 +14,12 @@ import os
14
  import tempfile
15
  from pydub import AudioSegment
16
 
 
 
 
 
 
 
17
  toxicity = Detoxify('original')
18
  with open('harvard_sentences.txt') as f:
19
  sents = f.read().strip().splitlines()
 
14
  import tempfile
15
  from pydub import AudioSegment
16
 
17
+ from gradio_space_ci import enable_space_ci
18
+
19
+ enable_space_ci()
20
+
21
+
22
+
23
  toxicity = Detoxify('original')
24
  with open('harvard_sentences.txt') as f:
25
  sents = f.read().strip().splitlines()
requirements.txt CHANGED
@@ -6,4 +6,5 @@ gradio_client
6
  git+https://github.com/unitaryai/detoxify
7
  pyloudnorm
8
  langdetect
9
- pydub
 
 
6
  git+https://github.com/unitaryai/detoxify
7
  pyloudnorm
8
  langdetect
9
+ pydub
10
+ gradio-space-ci @ git+https://huggingface.co/spaces/Wauplin/gradio-space-ci@0.2.1