Update app.py
Browse files
app.py
CHANGED
@@ -13,9 +13,7 @@ import os
|
|
13 |
|
14 |
os.system("python3 -m pip install pytorch-lightning==1.7.0 aitextgen")
|
15 |
|
16 |
-
|
17 |
-
|
18 |
-
with open("/usr/local/lib/python3.10/dist-packages/pytorch_lightning/callbacks/progress/rich_progress.py", "r") as file:
|
19 |
lines = file.readlines()
|
20 |
|
21 |
#replace line 20 "from torchmetrics.utilities.imports import _compare_version"
|
@@ -23,7 +21,7 @@ with open("/usr/local/lib/python3.10/dist-packages/pytorch_lightning/callbacks/p
|
|
23 |
#"from lightning_utilities.core.imports import compare_version as _compare_version"
|
24 |
lines[19] = "from lightning_utilities.core.imports import compare_version as _compare_version\n"
|
25 |
|
26 |
-
with open("/
|
27 |
file.writelines(lines)
|
28 |
|
29 |
import sys
|
|
|
13 |
|
14 |
os.system("python3 -m pip install pytorch-lightning==1.7.0 aitextgen")
|
15 |
|
16 |
+
with open("/home/user/.local/lib/python3.10/site-packages/pytorch_lightning/callbacks/progress/rich_progress.py", "r") as file:
|
|
|
|
|
17 |
lines = file.readlines()
|
18 |
|
19 |
#replace line 20 "from torchmetrics.utilities.imports import _compare_version"
|
|
|
21 |
#"from lightning_utilities.core.imports import compare_version as _compare_version"
|
22 |
lines[19] = "from lightning_utilities.core.imports import compare_version as _compare_version\n"
|
23 |
|
24 |
+
with open("/home/user/.local/lib/python3.10/site-packages/pytorch_lightning/callbacks/progress/rich_progress.py", "w") as file:
|
25 |
file.writelines(lines)
|
26 |
|
27 |
import sys
|