Spaces:
Runtime error
Runtime error
ClΓ©mentine
commited on
Commit
Β·
7bb3bb8
1
Parent(s):
2246286
Added CI
Browse files- app.py +12 -1
- requirements.txt +2 -1
app.py
CHANGED
|
@@ -2,6 +2,7 @@ import gradio as gr
|
|
| 2 |
import pandas as pd
|
| 3 |
from apscheduler.schedulers.background import BackgroundScheduler
|
| 4 |
from huggingface_hub import snapshot_download
|
|
|
|
| 5 |
|
| 6 |
from src.display.about import (
|
| 7 |
CITATION_BUTTON_LABEL,
|
|
@@ -374,4 +375,14 @@ with demo:
|
|
| 374 |
scheduler = BackgroundScheduler()
|
| 375 |
scheduler.add_job(restart_space, "interval", seconds=1800)
|
| 376 |
scheduler.start()
|
| 377 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
import pandas as pd
|
| 3 |
from apscheduler.schedulers.background import BackgroundScheduler
|
| 4 |
from huggingface_hub import snapshot_download
|
| 5 |
+
from gradio_space_ci import configure_space_ci
|
| 6 |
|
| 7 |
from src.display.about import (
|
| 8 |
CITATION_BUTTON_LABEL,
|
|
|
|
| 375 |
scheduler = BackgroundScheduler()
|
| 376 |
scheduler.add_job(restart_space, "interval", seconds=1800)
|
| 377 |
scheduler.start()
|
| 378 |
+
|
| 379 |
+
# Both launches the space and its CI
|
| 380 |
+
configure_space_ci(
|
| 381 |
+
demo.queue(default_concurrency_limit=40),
|
| 382 |
+
trusted_authors=[], # space owners + manually trusted authors
|
| 383 |
+
private="True", # ephemeral spaces will have same visibility as the main space. Otherwise, set to `True` or `False` explicitly.
|
| 384 |
+
variables="auto", # same variables as the main space. Otherwise, set to a `Dict[str, str]`.
|
| 385 |
+
secrets=["HF_TOKEN", "H4_TOKEN"], # which secret do I want to copy from the main space? Can be a `List[str]`.
|
| 386 |
+
hardware=None, # "cpu-basic" by default. Otherwise set to "auto" to have same hardware as the main space or any valid string value.
|
| 387 |
+
storage=None, # no storage by default. Otherwise set to "auto" to have same storage as the main space or any valid string value.
|
| 388 |
+
).launch()
|
requirements.txt
CHANGED
|
@@ -17,4 +17,5 @@ sentencepiece
|
|
| 17 |
semantic-version==2.10.0
|
| 18 |
tqdm==4.65.0
|
| 19 |
transformers==4.35.2
|
| 20 |
-
tokenizers>=0.15.0
|
|
|
|
|
|
| 17 |
semantic-version==2.10.0
|
| 18 |
tqdm==4.65.0
|
| 19 |
transformers==4.35.2
|
| 20 |
+
tokenizers>=0.15.0
|
| 21 |
+
gradio-space-ci@git+https://huggingface.co/spaces/Wauplin/gradio-space-ci # CI !!!
|