Spaces:
Runtime error
Runtime error
Push
Browse files- Dockerfile +6 -1
- data/datasets/local/spotify/data-00000-of-00001.parquet +0 -3
- data/datasets/local/spotify/manifest.json +0 -27
- data/datasets/local/spotify/text/sbert/data-00000-of-00001.parquet +0 -3
- data/datasets/local/spotify/text/sbert/embeddings-00000-of-00001.keys.pkl +0 -3
- data/datasets/local/spotify/text/sbert/embeddings-00000-of-00001.npy +0 -3
- data/datasets/local/spotify/text/sbert/signal_manifest.json +0 -37
- src/server.py +2 -1
Dockerfile
CHANGED
@@ -21,4 +21,9 @@ COPY /web/blueprint/build ./web/blueprint/build
|
|
21 |
# Copy python files.
|
22 |
COPY /src ./src/
|
23 |
|
24 |
-
CMD [
|
|
|
|
|
|
|
|
|
|
|
|
21 |
# Copy python files.
|
22 |
COPY /src ./src/
|
23 |
|
24 |
+
CMD [ \
|
25 |
+
"uvicorn", "src.server:app", \
|
26 |
+
"--host", "0.0.0.0", \
|
27 |
+
"--port", "5432", \
|
28 |
+
"-k", "uvicorn.workers.UvicornWorker" \
|
29 |
+
]
|
data/datasets/local/spotify/data-00000-of-00001.parquet
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:32224657332b09187a737c73ab634f9d14c9ba9a240bd105f1b9819cde2afcef
|
3 |
-
size 37128682
|
|
|
|
|
|
|
|
data/datasets/local/spotify/manifest.json
DELETED
@@ -1,27 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"files": [
|
3 |
-
"data-00000-of-00001.parquet"
|
4 |
-
],
|
5 |
-
"data_schema": {
|
6 |
-
"fields": {
|
7 |
-
"artist": {
|
8 |
-
"dtype": "string"
|
9 |
-
},
|
10 |
-
"song": {
|
11 |
-
"dtype": "string"
|
12 |
-
},
|
13 |
-
"link": {
|
14 |
-
"dtype": "string"
|
15 |
-
},
|
16 |
-
"text": {
|
17 |
-
"dtype": "string"
|
18 |
-
},
|
19 |
-
"__line_number__": {
|
20 |
-
"dtype": "int64"
|
21 |
-
},
|
22 |
-
"__rowid__": {
|
23 |
-
"dtype": "string"
|
24 |
-
}
|
25 |
-
}
|
26 |
-
}
|
27 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
data/datasets/local/spotify/text/sbert/data-00000-of-00001.parquet
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:9796beb630cc3503f3c2ac9db8f71e4c1604570836d78bbf364e801cd427c39e
|
3 |
-
size 2709987
|
|
|
|
|
|
|
|
data/datasets/local/spotify/text/sbert/embeddings-00000-of-00001.keys.pkl
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:d5df43291782b8c731d4ce56537946654c642a01dc9a4e37de394836362f6b45
|
3 |
-
size 3727400
|
|
|
|
|
|
|
|
data/datasets/local/spotify/text/sbert/embeddings-00000-of-00001.npy
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:94e10c23d7229541e1f60b791a659d13673b10a03649abf0ae092e0e18c5aee3
|
3 |
-
size 170446976
|
|
|
|
|
|
|
|
data/datasets/local/spotify/text/sbert/signal_manifest.json
DELETED
@@ -1,37 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"files": [
|
3 |
-
"data-00000-of-00001.parquet"
|
4 |
-
],
|
5 |
-
"parquet_id": "sbert(text)",
|
6 |
-
"data_schema": {
|
7 |
-
"fields": {
|
8 |
-
"__rowid__": {
|
9 |
-
"dtype": "string"
|
10 |
-
},
|
11 |
-
"text": {
|
12 |
-
"fields": {
|
13 |
-
"sbert": {
|
14 |
-
"repeated_field": {
|
15 |
-
"fields": {
|
16 |
-
"embedding": {
|
17 |
-
"dtype": "embedding"
|
18 |
-
}
|
19 |
-
},
|
20 |
-
"dtype": "string_span"
|
21 |
-
},
|
22 |
-
"signal": {
|
23 |
-
"signal_name": "sbert"
|
24 |
-
}
|
25 |
-
}
|
26 |
-
}
|
27 |
-
}
|
28 |
-
}
|
29 |
-
},
|
30 |
-
"signal": {
|
31 |
-
"signal_name": "sbert"
|
32 |
-
},
|
33 |
-
"enriched_path": [
|
34 |
-
"text"
|
35 |
-
],
|
36 |
-
"embedding_filename_prefix": "embeddings-00000-of-00001"
|
37 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
src/server.py
CHANGED
@@ -68,7 +68,6 @@ app.mount('/', StaticFiles(directory=DIST_PATH, html=True, check_dir=False))
|
|
68 |
@app.on_event('startup')
|
69 |
def startup() -> None:
|
70 |
"""Download dataset files from the HF space that was uploaded before building the image."""
|
71 |
-
# Setup.
|
72 |
repo_id = CONFIG.get('HF_DATA_FROM_SPACE', None)
|
73 |
|
74 |
if repo_id:
|
@@ -89,6 +88,8 @@ def startup() -> None:
|
|
89 |
persistent_output_dir = get_dataset_output_dir(data_path(), dataset.namespace,
|
90 |
dataset.dataset_name)
|
91 |
|
|
|
|
|
92 |
shutil.rmtree(persistent_output_dir, ignore_errors=True)
|
93 |
shutil.move(spaces_dataset_output_dir, persistent_output_dir)
|
94 |
|
|
|
68 |
@app.on_event('startup')
|
69 |
def startup() -> None:
|
70 |
"""Download dataset files from the HF space that was uploaded before building the image."""
|
|
|
71 |
repo_id = CONFIG.get('HF_DATA_FROM_SPACE', None)
|
72 |
|
73 |
if repo_id:
|
|
|
88 |
persistent_output_dir = get_dataset_output_dir(data_path(), dataset.namespace,
|
89 |
dataset.dataset_name)
|
90 |
|
91 |
+
# Huggingface doesn't let you selectively download files so we just copy the data directory
|
92 |
+
# out of the cloned space.
|
93 |
shutil.rmtree(persistent_output_dir, ignore_errors=True)
|
94 |
shutil.move(spaces_dataset_output_dir, persistent_output_dir)
|
95 |
|