Merge pull request #174 from ebolam/united
Fix for blank model info box when downloading model
This commit is contained in:
commit
a63f7cfa5a
15
aiserver.py
15
aiserver.py
|
@ -1319,13 +1319,14 @@ def patch_transformers_download():
|
||||||
import copy, requests, tqdm, time
|
import copy, requests, tqdm, time
|
||||||
class Send_to_socketio(object):
|
class Send_to_socketio(object):
|
||||||
def write(self, bar):
|
def write(self, bar):
|
||||||
bar = bar.replace("\r", "")
|
bar = bar.replace("\r", "").replace("\n", "")
|
||||||
try:
|
if bar != "":
|
||||||
print(bar, end="\r")
|
try:
|
||||||
emit('from_server', {'cmd': 'model_load_status', 'data': bar.replace(" ", " ")}, broadcast=True)
|
print(bar, end="\r")
|
||||||
eventlet.sleep(seconds=0)
|
emit('from_server', {'cmd': 'model_load_status', 'data': bar.replace(" ", " ")}, broadcast=True)
|
||||||
except:
|
eventlet.sleep(seconds=0)
|
||||||
pass
|
except:
|
||||||
|
pass
|
||||||
def http_get(
|
def http_get(
|
||||||
url: str,
|
url: str,
|
||||||
temp_file: transformers.utils.hub.BinaryIO,
|
temp_file: transformers.utils.hub.BinaryIO,
|
||||||
|
|
Loading…
Reference in New Issue