Spaces:
Runtime error
Runtime error
Create path_fixes.py
Browse files- server/utils/path_fixes.py +32 -0
server/utils/path_fixes.py
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from pathlib import Path
|
2 |
+
import os
|
3 |
+
|
4 |
+
FAISS_LAYER_PATTERN = 'layer_*.faiss'
|
5 |
+
LAYER_TEMPLATE = 'layer_{:02d}.faiss'
|
6 |
+
|
7 |
+
ROOT_DIR = Path(os.path.abspath(__file__)).parent.parent.parent
|
8 |
+
CORPORA = ROOT_DIR / "corpora"
|
9 |
+
DATA_DIR = ROOT_DIR / 'server' / 'data'
|
10 |
+
DATASET_DIR = Path.home() / 'Datasets'
|
11 |
+
ROOT_DIR = Path(os.path.abspath(__file__)).parent.parent.parent
|
12 |
+
WIKI_PATH = DATASET_DIR / 'wikipedia'
|
13 |
+
|
14 |
+
# ==============================================================
|
15 |
+
# WIZARD OF OZ
|
16 |
+
# (should I put this into a dictionary? That would make more sense...)
|
17 |
+
# ==============================================================
|
18 |
+
WOZ_DIR = DATA_DIR / 'woz'
|
19 |
+
WOZ_PATH = WOZ_DIR / 'wizard-of-oz.txt'
|
20 |
+
|
21 |
+
## EMBEDDINGS
|
22 |
+
WOZ_EMBEDDINGS = WOZ_DIR / 'embeddings'
|
23 |
+
WOZ_HDF5 = WOZ_EMBEDDINGS / 'combined.hdf5'
|
24 |
+
WOZ_LAYER_TEMPLATE = WOZ_EMBEDDINGS / LAYER_TEMPLATE
|
25 |
+
|
26 |
+
## HEAD INFO
|
27 |
+
WOZ_CONTEXT = WOZ_DIR / 'headContext'
|
28 |
+
WOZ_CONTEXT_HDF5 = WOZ_CONTEXT / 'combined.hdf5'
|
29 |
+
WOZ_CONTEXT_LAYER_TEMPLATE = WOZ_CONTEXT / LAYER_TEMPLATE
|
30 |
+
|
31 |
+
# SERVING STATIC FILES
|
32 |
+
CLIENT_DIST = ROOT_DIR / 'client' / 'dist'
|