Update model.py
Browse files
model.py
CHANGED
@@ -70,7 +70,7 @@ def run(message: str,
|
|
70 |
top_p: float = 0.95,
|
71 |
top_k: int = 50) -> Iterator[str]:
|
72 |
prompt = get_prompt(message, chat_history, system_prompt)
|
73 |
-
inputs = tokenizer([prompt], return_tensors='pt', add_special_tokens=False).to(
|
74 |
|
75 |
streamer = TextIteratorStreamer(tokenizer,
|
76 |
timeout=10.,
|
|
|
70 |
top_p: float = 0.95,
|
71 |
top_k: int = 50) -> Iterator[str]:
|
72 |
prompt = get_prompt(message, chat_history, system_prompt)
|
73 |
+
inputs = tokenizer([prompt], return_tensors='pt', add_special_tokens=False).to(device)
|
74 |
|
75 |
streamer = TextIteratorStreamer(tokenizer,
|
76 |
timeout=10.,
|