upgraded configuration settings

This commit is contained in:
Saifeddine ALOUI 2023-04-14 17:11:40 +02:00
parent a757331b20
commit 37304a735d
2 changed files with 7 additions and 1 deletions

7
app.py
View File

@ -33,7 +33,7 @@ import gc
app = Flask("GPT4All-WebUI", static_url_path="/static", static_folder="static")
import time
from config import load_config, save_config
import shutil
class Gpt4AllWebUI:
def __init__(self, _app, config:dict, personality:dict, config_file_path) -> None:
@ -577,6 +577,11 @@ if __name__ == "__main__":
parser.set_defaults(debug=False)
args = parser.parse_args()
if args.config=="default":
args.config = "local_default"
if not Path(f"configs/local_default.yaml").exists():
print("No local configuration file found. Building from scratch")
shutil.copy(f"configs/default.yaml", f"configs/local_default.yaml")
config_file_path = f"configs/{args.config}.yaml"
config = load_config(config_file_path)

View File

@ -16,3 +16,4 @@ temp: 0.1
top_k: 40
top_p: 0.95
voice: ""
use_gpu: false # Not active yet