Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -74,6 +74,7 @@ def chat_llama3_8b(message: str,
|
|
74 |
input_ids = tokenizer.apply_chat_template(conversation, return_tensors="pt", add_generation_prompt=True).to(model.device)
|
75 |
# for debug
|
76 |
print(tokenizer.apply_chat_template(conversation, add_generation_prompt=True, tokenize=False))
|
|
|
77 |
|
78 |
streamer = TextIteratorStreamer(tokenizer, timeout=10.0, skip_prompt=True, skip_special_tokens=True)
|
79 |
|
@@ -95,7 +96,7 @@ def chat_llama3_8b(message: str,
|
|
95 |
outputs = []
|
96 |
for text in streamer:
|
97 |
outputs.append(text)
|
98 |
-
|
99 |
yield "".join(outputs)
|
100 |
|
101 |
# Gradio block
|
|
|
74 |
input_ids = tokenizer.apply_chat_template(conversation, return_tensors="pt", add_generation_prompt=True).to(model.device)
|
75 |
# for debug
|
76 |
print(tokenizer.apply_chat_template(conversation, add_generation_prompt=True, tokenize=False))
|
77 |
+
print(input_ids)
|
78 |
|
79 |
streamer = TextIteratorStreamer(tokenizer, timeout=10.0, skip_prompt=True, skip_special_tokens=True)
|
80 |
|
|
|
96 |
outputs = []
|
97 |
for text in streamer:
|
98 |
outputs.append(text)
|
99 |
+
print(outputs)
|
100 |
yield "".join(outputs)
|
101 |
|
102 |
# Gradio block
|