Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -62,7 +62,6 @@ def stream_chat(message: str, history: list, temperature: float, max_new_tokens:
|
|
62 |
conversation = []
|
63 |
for prompt, answer in history:
|
64 |
conversation.extend([{"role": "user", "content": prompt}, {"role": "assistant", "content": answer}])
|
65 |
-
|
66 |
conversation.append({"role": "user", "content": message})
|
67 |
|
68 |
print(f"Conversation is -\n{conversation}")
|
@@ -72,7 +71,7 @@ def stream_chat(message: str, history: list, temperature: float, max_new_tokens:
|
|
72 |
streamer = TextIteratorStreamer(tokenizer, **{"skip_special_tokens": True, "skip_prompt": True, 'clean_up_tokenization_spaces':False,})
|
73 |
|
74 |
generate_kwargs = dict(
|
75 |
-
input_ids,
|
76 |
streamer=streamer,
|
77 |
max_new_tokens=max_new_tokens,
|
78 |
do_sample=True,
|
|
|
62 |
conversation = []
|
63 |
for prompt, answer in history:
|
64 |
conversation.extend([{"role": "user", "content": prompt}, {"role": "assistant", "content": answer}])
|
|
|
65 |
conversation.append({"role": "user", "content": message})
|
66 |
|
67 |
print(f"Conversation is -\n{conversation}")
|
|
|
71 |
streamer = TextIteratorStreamer(tokenizer, **{"skip_special_tokens": True, "skip_prompt": True, 'clean_up_tokenization_spaces':False,})
|
72 |
|
73 |
generate_kwargs = dict(
|
74 |
+
input_ids=input_ids,
|
75 |
streamer=streamer,
|
76 |
max_new_tokens=max_new_tokens,
|
77 |
do_sample=True,
|