Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -52,7 +52,7 @@ def stream_chat(message: str, history: list, temperature: float, max_new_tokens:
|
|
52 |
print(f"Conversation is -\n{conversation}")
|
53 |
|
54 |
input_ids = tokenizer.apply_chat_template(conversation, tokenize=False, add_generation_prompt=True)
|
55 |
-
inputs = tokenizer(input_ids, return_tensors="pt").to(
|
56 |
|
57 |
streamer = TextIteratorStreamer(tokenizer, timeout=60., skip_prompt=True, skip_special_tokens=True)
|
58 |
|
|
|
52 |
print(f"Conversation is -\n{conversation}")
|
53 |
|
54 |
input_ids = tokenizer.apply_chat_template(conversation, tokenize=False, add_generation_prompt=True)
|
55 |
+
inputs = tokenizer(input_ids, return_tensors="pt").to('cpu') #gpu 0, cpu 1
|
56 |
|
57 |
streamer = TextIteratorStreamer(tokenizer, timeout=60., skip_prompt=True, skip_special_tokens=True)
|
58 |
|