Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ llm = AutoModelForCausalLM.from_pretrained("TheBloke/WizardLM-7B-uncensored-GGUF
|
|
9 |
def generate_response(message):
|
10 |
|
11 |
for text in llm(message):
|
12 |
-
yield text
|
13 |
|
14 |
|
15 |
def chatbot(message, history):
|
@@ -17,8 +17,8 @@ def chatbot(message, history):
|
|
17 |
for response in response_generator:
|
18 |
time.sleep(0.3)
|
19 |
# Optional delay for a natural chat feel
|
20 |
-
|
21 |
-
yield
|
22 |
|
23 |
iface = gr.ChatInterface(chatbot)
|
24 |
iface.launch()
|
|
|
9 |
def generate_response(message):
|
10 |
|
11 |
for text in llm(message):
|
12 |
+
yield " ".join(text)
|
13 |
|
14 |
|
15 |
def chatbot(message, history):
|
|
|
17 |
for response in response_generator:
|
18 |
time.sleep(0.3)
|
19 |
# Optional delay for a natural chat feel
|
20 |
+
|
21 |
+
yield response
|
22 |
|
23 |
iface = gr.ChatInterface(chatbot)
|
24 |
iface.launch()
|