Spaces:
Runtime error
Runtime error
Fix auto-restart
Browse files
app.py
CHANGED
@@ -18,6 +18,7 @@ It's designed as a template to recreate the dashboard for the prompt translation
|
|
18 |
|
19 |
To create a new dashboard, you need several environment variables, that you can easily set in the HuggingFace Space that you are using to host the dashboard:
|
20 |
|
|
|
21 |
- SOURCE_DATASET: The dataset id of the source dataset
|
22 |
- SOURCE_WORKSPACE: The workspace id of the source dataset
|
23 |
- TARGET_RECORDS: The number of records that you have as a target to annotate. We usually set this to 500.
|
@@ -44,7 +45,7 @@ def restart() -> None:
|
|
44 |
# Update Space name with your Space information
|
45 |
gr.Info("Restarting space at " + str(datetime.datetime.now()))
|
46 |
restart_space(
|
47 |
-
"
|
48 |
token=os.getenv("HF_TOKEN"),
|
49 |
# factory_reboot=True,
|
50 |
)
|
|
|
18 |
|
19 |
To create a new dashboard, you need several environment variables, that you can easily set in the HuggingFace Space that you are using to host the dashboard:
|
20 |
|
21 |
+
- HF_TOKEN: Token with write access from your Hugging Face account: https://huggingface.co/settings/tokens
|
22 |
- SOURCE_DATASET: The dataset id of the source dataset
|
23 |
- SOURCE_WORKSPACE: The workspace id of the source dataset
|
24 |
- TARGET_RECORDS: The number of records that you have as a target to annotate. We usually set this to 500.
|
|
|
45 |
# Update Space name with your Space information
|
46 |
gr.Info("Restarting space at " + str(datetime.datetime.now()))
|
47 |
restart_space(
|
48 |
+
"DIBT-Czech/Dashboard",
|
49 |
token=os.getenv("HF_TOKEN"),
|
50 |
# factory_reboot=True,
|
51 |
)
|