64
Browse files- app/app.py +1 -1
- app/data/shakespeare_char/prepare.py +5 -5
app/app.py
CHANGED
@@ -19,7 +19,7 @@ def prepare_data():
|
|
19 |
st.title("Sortie de la commande Python")
|
20 |
|
21 |
# Commande Python à exécuter
|
22 |
-
command = "python3 data/shakespeare_char/prepare.py"
|
23 |
|
24 |
# Sorties de la commmande
|
25 |
stdout, stderr = run_command(command)
|
|
|
19 |
st.title("Sortie de la commande Python")
|
20 |
|
21 |
# Commande Python à exécuter
|
22 |
+
command = "sudo python3 data/shakespeare_char/prepare.py"
|
23 |
|
24 |
# Sorties de la commmande
|
25 |
stdout, stderr = run_command(command)
|
app/data/shakespeare_char/prepare.py
CHANGED
@@ -50,11 +50,11 @@ train_ids = np.array(train_ids, dtype=np.uint16)
|
|
50 |
val_ids = np.array(val_ids, dtype=np.uint16)
|
51 |
train_ids.tofile(os.path.join(os.path.dirname(__file__), 'train.bin'))
|
52 |
val_ids.tofile(os.path.join(os.path.dirname(__file__), 'val.bin'))
|
53 |
-
file_path_train = './train.bin'
|
54 |
-
file_path_val = './val.bin'
|
55 |
-
permissions = 0o755
|
56 |
-
os.chmod(file_path_train, permissions)
|
57 |
-
os.chmod(file_path_val, permissions)
|
58 |
|
59 |
# save the meta information as well, to help us encode/decode later
|
60 |
meta = {
|
|
|
50 |
val_ids = np.array(val_ids, dtype=np.uint16)
|
51 |
train_ids.tofile(os.path.join(os.path.dirname(__file__), 'train.bin'))
|
52 |
val_ids.tofile(os.path.join(os.path.dirname(__file__), 'val.bin'))
|
53 |
+
# file_path_train = './train.bin'
|
54 |
+
# file_path_val = './val.bin'
|
55 |
+
# permissions = 0o755
|
56 |
+
# os.chmod(file_path_train, permissions)
|
57 |
+
# os.chmod(file_path_val, permissions)
|
58 |
|
59 |
# save the meta information as well, to help us encode/decode later
|
60 |
meta = {
|