From 79a0637610b9cca3f5055af3c9d7c6512e1cae18 Mon Sep 17 00:00:00 2001 From: Saifeddine ALOUI Date: Mon, 29 May 2023 22:03:12 +0200 Subject: [PATCH] speed --- api/__init__.py | 7 ++----- docs/youtube/script_models.md | 6 +++++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/api/__init__.py b/api/__init__.py index 311281cf..d45a5452 100644 --- a/api/__init__.py +++ b/api/__init__.py @@ -18,6 +18,7 @@ import time import requests from tqdm import tqdm import traceback +import sys __author__ = "parisneo" __github__ = "https://github.com/ParisNeo/gpt4all-ui" @@ -368,10 +369,6 @@ class ModelProcess: return output def _callback(self, text, text_type=0): - try: - print(str(text), end="", flush=True) - except Exception as ex: - print(".") self.curent_text += text detected_anti_prompt = False anti_prompt_to_remove="" @@ -382,7 +379,6 @@ class ModelProcess: if not detected_anti_prompt: if not self.ready: - print(".",end="", flush=True) return True else: # Stream the generated text to the main process @@ -768,6 +764,7 @@ class GPT4AllAPI(): while(not self.process.completion_signal.is_set() or not self.process.generation_queue.empty()): # Simulating other commands being issued try: chunk, tok, message_type = self.process.generation_queue.get(False, 2) + print(chunk, end="") if chunk!="": self.process_chunk(chunk, message_type) except Exception as ex: diff --git a/docs/youtube/script_models.md b/docs/youtube/script_models.md index cce34c80..261ec4c4 100644 --- a/docs/youtube/script_models.md +++ b/docs/youtube/script_models.md @@ -1,3 +1,7 @@ Hi there, welcome to a snippet about bindings and models selection. -In this short video we will look at bindings and models \ No newline at end of file +In this short video we will look at bindings and models, how to select them and how to use them. + +First, to select a binding, go to the settings tab then Bindings zoo. + +You will find a certain numbre of \ No newline at end of file