Update app.py
Browse files
app.py
CHANGED
@@ -6,9 +6,9 @@ from ctransformers import AutoModelForCausalLM
|
|
6 |
llm = AutoModelForCausalLM.from_pretrained("TheBloke/WizardLM-7B-uncensored-GGUF", model_file="WizardLM-7B-uncensored.Q4_K_M.gguf", model_type="llama", stream=True)
|
7 |
|
8 |
def generate_response(message):
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
|
13 |
|
14 |
def chatbot(message, history):
|
|
|
6 |
llm = AutoModelForCausalLM.from_pretrained("TheBloke/WizardLM-7B-uncensored-GGUF", model_file="WizardLM-7B-uncensored.Q4_K_M.gguf", model_type="llama", stream=True)
|
7 |
|
8 |
def generate_response(message):
|
9 |
+
for text in llm(message):
|
10 |
+
toe = "".join(text)
|
11 |
+
yield toe
|
12 |
|
13 |
|
14 |
def chatbot(message, history):
|