Spaces:
Runtime error
Runtime error
Upload app.py
Browse files
app.py
CHANGED
@@ -78,13 +78,7 @@ def merlin_chat(message, history):
|
|
78 |
user_msg = {'role': 'user', 'content': message}
|
79 |
prompt = "[" + json.dumps(system_msg) + chat_json + json.dumps(user_msg) + "{'role': 'assistant, 'content': '*recalls \""
|
80 |
for attempt in range(3):
|
81 |
-
result = model(
|
82 |
-
prompt,
|
83 |
-
return_full_text=False
|
84 |
-
max_new_tokens=250
|
85 |
-
# truncation=True,
|
86 |
-
# handle_long_generation="hole"
|
87 |
-
)
|
88 |
response = result[0]['generated_text']
|
89 |
start = 0
|
90 |
end = 0
|
|
|
78 |
user_msg = {'role': 'user', 'content': message}
|
79 |
prompt = "[" + json.dumps(system_msg) + chat_json + json.dumps(user_msg) + "{'role': 'assistant, 'content': '*recalls \""
|
80 |
for attempt in range(3):
|
81 |
+
result = model(prompt, max_new_tokens=250, return_full_text=False, handle_long_generation="hole")
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
response = result[0]['generated_text']
|
83 |
start = 0
|
84 |
end = 0
|