Update app.py
Browse files
app.py
CHANGED
@@ -20,13 +20,10 @@ def model_setup(model_id):
|
|
20 |
return pipe
|
21 |
|
22 |
def runModel(prompt):
|
23 |
-
messages = [
|
24 |
-
{"role": "system", "content": "You are a helpful assistant who politely answers user's questions."},
|
25 |
-
{"role": "user", "content": prompt},
|
26 |
-
]
|
27 |
outputs = pipe(
|
28 |
messages,
|
29 |
-
max_new_tokens=
|
30 |
)
|
31 |
return outputs[0]["generated_text"][-1]["content"]
|
32 |
|
|
|
20 |
return pipe
|
21 |
|
22 |
def runModel(prompt):
|
23 |
+
messages = [{"role": "user", "content": "You are a helpful assistant who politely answers user's questions."+prompt}]
|
|
|
|
|
|
|
24 |
outputs = pipe(
|
25 |
messages,
|
26 |
+
max_new_tokens=4096,
|
27 |
)
|
28 |
return outputs[0]["generated_text"][-1]["content"]
|
29 |
|