Spaces:
Runtime error
Runtime error
alfonsovelp
commited on
Commit
•
11bd8a5
1
Parent(s):
00a96ec
Update app.py
Browse files
app.py
CHANGED
@@ -49,11 +49,11 @@ def generate(
|
|
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
|
57 |
output = ""
|
58 |
|
59 |
for response in stream:
|
|
|
49 |
|
50 |
|
51 |
messages = [
|
52 |
+
{"role": "user", "content": f"[INST] {prompt} [/INST]"}
|
53 |
]
|
54 |
|
55 |
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt")
|
56 |
+
stream = model.generate(inputs, **generate_kwargs)
|
57 |
output = ""
|
58 |
|
59 |
for response in stream:
|