mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-03-10 08:30:19 +01:00
Make sure tqdm progress bars display properly in Colab
This commit is contained in:
parent
91d3672446
commit
f9f1a5f3a9
10
aiserver.py
10
aiserver.py
@ -57,6 +57,16 @@ if lupa.LUA_VERSION[:2] != (5, 4):
|
|||||||
print(f"Please install lupa==1.10. You have lupa {lupa.__version__}.", file=sys.stderr)
|
print(f"Please install lupa==1.10. You have lupa {lupa.__version__}.", file=sys.stderr)
|
||||||
|
|
||||||
|
|
||||||
|
# Make sure tqdm progress bars display properly in Colab
|
||||||
|
from tqdm.auto import tqdm
|
||||||
|
old_init = tqdm.__init__
|
||||||
|
def new_init(self, *args, **kwargs):
|
||||||
|
old_init(self, *args, **kwargs)
|
||||||
|
if(self.ncols == 0 and kwargs.get("ncols") != 0):
|
||||||
|
self.ncols = 99
|
||||||
|
tqdm.__init__ = new_init
|
||||||
|
|
||||||
|
|
||||||
#==================================================================#
|
#==================================================================#
|
||||||
# Variables & Storage
|
# Variables & Storage
|
||||||
#==================================================================#
|
#==================================================================#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user