Spaces:
Running
on
Zero
Running
on
Zero
artificialguybr
commited on
Commit
•
be3c447
1
Parent(s):
f6fc9d2
Update app.py
Browse files
app.py
CHANGED
@@ -50,16 +50,18 @@ def stream_chat(
|
|
50 |
for prompt, answer in history:
|
51 |
chat_history.append((prompt, answer))
|
52 |
|
53 |
-
|
54 |
tokenizer,
|
55 |
message,
|
56 |
-
chat_history,
|
57 |
max_new_tokens=max_new_tokens,
|
58 |
top_p=top_p,
|
59 |
top_k=top_k,
|
60 |
temperature=temperature,
|
61 |
-
)
|
62 |
-
|
|
|
|
|
63 |
|
64 |
chatbot = gr.Chatbot(height=600, placeholder=PLACEHOLDER)
|
65 |
|
|
|
50 |
for prompt, answer in history:
|
51 |
chat_history.append((prompt, answer))
|
52 |
|
53 |
+
response, _ = model.chat(
|
54 |
tokenizer,
|
55 |
message,
|
56 |
+
history=chat_history,
|
57 |
max_new_tokens=max_new_tokens,
|
58 |
top_p=top_p,
|
59 |
top_k=top_k,
|
60 |
temperature=temperature,
|
61 |
+
)
|
62 |
+
|
63 |
+
yield response
|
64 |
+
|
65 |
|
66 |
chatbot = gr.Chatbot(height=600, placeholder=PLACEHOLDER)
|
67 |
|