Update app.py
Browse files
app.py
CHANGED
@@ -29,7 +29,7 @@ timestamp = datetime.now().strftime("%Y-%m-%d_%H-%M-%S")
|
|
29 |
|
30 |
# Function to load the LLaMA model
|
31 |
def load_model():
|
32 |
-
llm = Llama(model_path=model_file, model_type="mistral",n_gpu_layers=100,n_ctx = 2048)
|
33 |
return llm
|
34 |
|
35 |
# Function to generate a unique identifier for each chat session
|
@@ -55,7 +55,7 @@ class ChatbotAPP:
|
|
55 |
self.unique_id = unique_id # Unique identifier for the chat session
|
56 |
self.chat_history = [] # List to store chat history for the current session
|
57 |
self.chat_log_history = [] # List to store chat logs for uploading
|
58 |
-
self.
|
59 |
self.initContext = initContext # Initial context for the chat session
|
60 |
self.context = "" # Current context for the chat session
|
61 |
self.agreed = False # Flag to check if the user agreed to terms and conditions
|
|
|
29 |
|
30 |
# Function to load the LLaMA model
|
31 |
def load_model():
|
32 |
+
llm = Llama(model_path=model_file, model_type="mistral",n_gpu_layers=100,n_ctx = 2048,verbose=True)
|
33 |
return llm
|
34 |
|
35 |
# Function to generate a unique identifier for each chat session
|
|
|
55 |
self.unique_id = unique_id # Unique identifier for the chat session
|
56 |
self.chat_history = [] # List to store chat history for the current session
|
57 |
self.chat_log_history = [] # List to store chat logs for uploading
|
58 |
+
self.isFirstwRun = True # Flag to check if it's the first run of the chat session
|
59 |
self.initContext = initContext # Initial context for the chat session
|
60 |
self.context = "" # Current context for the chat session
|
61 |
self.agreed = False # Flag to check if the user agreed to terms and conditions
|