Spaces:
Runtime error
Runtime error
alfonsovelp
commited on
Commit
•
00a96ec
1
Parent(s):
5c4a967
Update app.py
Browse files
app.py
CHANGED
@@ -48,8 +48,11 @@ def generate(
|
|
48 |
|
49 |
|
50 |
|
|
|
|
|
|
|
51 |
|
52 |
-
inputs = tokenizer.apply_chat_template(
|
53 |
stream = model.generate(inputs, **generate_kwargs, stream=True, details=True, return_full_text=False)
|
54 |
output = ""
|
55 |
|
|
|
48 |
|
49 |
|
50 |
|
51 |
+
messages = [
|
52 |
+
{"role": "user", "content": prompt}
|
53 |
+
]
|
54 |
|
55 |
+
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt")
|
56 |
stream = model.generate(inputs, **generate_kwargs, stream=True, details=True, return_full_text=False)
|
57 |
output = ""
|
58 |
|