Merge pull request #174 from ebolam/united

Fix for blank model info box when downloading model
This commit is contained in:
henk717 2022-07-29 22:15:58 +02:00 committed by GitHub
commit a63f7cfa5a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 7 deletions

View File

@ -1319,7 +1319,8 @@ def patch_transformers_download():
import copy, requests, tqdm, time
class Send_to_socketio(object):
def write(self, bar):
bar = bar.replace("\r", "")
bar = bar.replace("\r", "").replace("\n", "")
if bar != "":
try:
print(bar, end="\r")
emit('from_server', {'cmd': 'model_load_status', 'data': bar.replace(" ", " ")}, broadcast=True)