SharmaGroups07 commited on
Commit
ef3a046
·
verified ·
1 Parent(s): 69bab40

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -8
app.py CHANGED
@@ -28,17 +28,18 @@ def root():
28
 
29
  @app.post("/chat")
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
43
  if __name__ == "__main__":
44
  import uvicorn
 
28
 
29
  @app.post("/chat")
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
+
43
  # ⭐ THIS PART WAS MISSING
44
  if __name__ == "__main__":
45
  import uvicorn