MixoMax commited on
Commit
3a69dd5
1 Parent(s): aac648b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -0
app.py CHANGED
@@ -13,6 +13,17 @@ import os
13
 
14
  os.system("python3 -m pip install pytorch-lightning==1.7.0 aitextgen")
15
 
 
 
 
 
 
 
 
 
 
 
 
16
  import sys
17
  from jinja2 import Template
18
  from aitextgen import aitextgen
 
13
 
14
  os.system("python3 -m pip install pytorch-lightning==1.7.0 aitextgen")
15
 
16
+ with open("/usr/local/lib/python3.10/dist-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"
20
+ #with
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("/usr/local/lib/python3.10/dist-packages/pytorch_lightning/callbacks/progress/rich_progress.py", "w") as file:
25
+ file.writelines(lines)
26
+
27
  import sys
28
  from jinja2 import Template
29
  from aitextgen import aitextgen