Beginning of multi-user support (#2262)

Adds a lock to generate_reply
This commit is contained in:
flurb18 2023-05-24 08:38:20 -04:00 committed by GitHub
parent 7dc87984a2
commit d37a28730d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 1 deletions

View file

@ -38,6 +38,7 @@ import zipfile
from datetime import datetime
from functools import partial
from pathlib import Path
from threading import Lock
import psutil
import torch
@ -1075,6 +1076,7 @@ if __name__ == "__main__":
'instruction_template': shared.settings['instruction_template']
})
shared.generation_lock = Lock()
# Launch the web UI
create_interface()
while True: