Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -30,9 +30,13 @@ def root():
|
|
| 30 |
def chat(req: ChatRequest):
|
| 31 |
output = llm(
|
| 32 |
f"<|user|>{req.message}<|assistant|>",
|
| 33 |
-
max_tokens=
|
|
|
|
|
|
|
|
|
|
| 34 |
stop=["<|end|>"]
|
| 35 |
)
|
|
|
|
| 36 |
return {"reply": output["choices"][0]["text"]}
|
| 37 |
|
| 38 |
# ⭐ THIS PART WAS MISSING
|
|
|
|
| 30 |
def chat(req: ChatRequest):
|
| 31 |
output = llm(
|
| 32 |
f"<|user|>{req.message}<|assistant|>",
|
| 33 |
+
max_tokens=512,
|
| 34 |
+
temperature=0.7,
|
| 35 |
+
top_p=0.9,
|
| 36 |
+
repeat_penalty=1.1,
|
| 37 |
stop=["<|end|>"]
|
| 38 |
)
|
| 39 |
+
|
| 40 |
return {"reply": output["choices"][0]["text"]}
|
| 41 |
|
| 42 |
# ⭐ THIS PART WAS MISSING
|