[chatbot] Fix chatbot cli and webview warning

Signed-Off-by: Gaurav Shukla <gaurav@nod-labs.com>
This commit is contained in:
Gaurav Shukla
2023-08-17 19:17:59 +05:30
parent 32eb78f0f9
commit 9ae8bc921e
3 changed files with 12 additions and 13 deletions

View File

@@ -37,7 +37,7 @@ def launch_app(address):
height=height,
text_select=True,
)
webview.start(private_mode=False)
webview.start(private_mode=False, storage_path=os.getcwd())
if __name__ == "__main__":

View File

@@ -150,7 +150,7 @@ def chat(
device,
precision,
config_file,
cli=True,
cli=False,
progress=gr.Progress(),
):
global past_key_values
@@ -235,7 +235,7 @@ def chat(
count = 0
start_time = time.time()
for text, msg in progress.tqdm(
vicuna_model.generate(prompt, cli=False),
vicuna_model.generate(prompt, cli=cli),
desc="generating response",
):
count += 1