Spaces:
Runtime error
Runtime error
Commit
·
b9a956a
1
Parent(s):
7789c70
update dockerfile
Browse files- load_data.py +3 -2
- start.sh +1 -1
load_data.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
import os
|
| 2 |
-
|
| 3 |
import requests
|
| 4 |
import time
|
| 5 |
import pandas as pd
|
|
@@ -11,7 +11,8 @@ from argilla.labeling.text_classification import Rule, add_rules
|
|
| 11 |
def load_datasets():
|
| 12 |
# This is the code that you want to execute when the endpoint is available
|
| 13 |
print("Argilla is available! Loading datasets")
|
| 14 |
-
api_key =
|
|
|
|
| 15 |
rg.init(api_key=api_key, workspace="admin")
|
| 16 |
|
| 17 |
# load dataset from json
|
|
|
|
| 1 |
import os
|
| 2 |
+
import sys
|
| 3 |
import requests
|
| 4 |
import time
|
| 5 |
import pandas as pd
|
|
|
|
| 11 |
def load_datasets():
|
| 12 |
# This is the code that you want to execute when the endpoint is available
|
| 13 |
print("Argilla is available! Loading datasets")
|
| 14 |
+
api_key = sys.argv[-1]
|
| 15 |
+
print(api_key)
|
| 16 |
rg.init(api_key=api_key, workspace="admin")
|
| 17 |
|
| 18 |
# load dataset from json
|
start.sh
CHANGED
|
@@ -38,7 +38,7 @@ sudo sed -i 's,ARGILLA_PASSWORD,'"$ARGILLA_PASSWORD"',g' /packages/users.yml
|
|
| 38 |
# Load data
|
| 39 |
echo "Loading data"
|
| 40 |
pip3 install datasets
|
| 41 |
-
python3.9 /load_data.py &
|
| 42 |
|
| 43 |
# Start argilla
|
| 44 |
echo "start argilla"
|
|
|
|
| 38 |
# Load data
|
| 39 |
echo "Loading data"
|
| 40 |
pip3 install datasets
|
| 41 |
+
python3.9 /load_data.py "$API_KEY" &
|
| 42 |
|
| 43 |
# Start argilla
|
| 44 |
echo "start argilla"
|