Update app.py
Browse files
app.py
CHANGED
@@ -30,7 +30,7 @@ def generate(prompt, stop):
|
|
30 |
max_tokens=64,
|
31 |
temperature=0.75,
|
32 |
top_p=0.7,
|
33 |
-
stop=[bytes(stop, "utf-8").decode("unicode_escape")],
|
34 |
)
|
35 |
print(output)
|
36 |
return output["choices"][0]["text"]
|
|
|
30 |
max_tokens=64,
|
31 |
temperature=0.75,
|
32 |
top_p=0.7,
|
33 |
+
stop=[bytes(stop, "utf-8").decode("unicode_escape")] if len(stop) > 1 else None,
|
34 |
)
|
35 |
print(output)
|
36 |
return output["choices"][0]["text"]
|