moamen270 commited on
Commit
76d2e50
·
1 Parent(s): 1844e8a

Update endpoints.py

Browse files
Files changed (1) hide show
  1. endpoints.py +4 -4
endpoints.py CHANGED
@@ -37,11 +37,11 @@ def get():
37
  return {"message": result}
38
 
39
 
40
- def askLLM(prompt):
41
- output = pipe(prompt,do_sample=False)
42
  return output
43
 
44
  @app.post("/ask_llm")
45
- def ask_llm_endpoint(prompt: str):
46
- result = askLLM(prompt)
47
  return {"result": result}
 
37
  return {"message": result}
38
 
39
 
40
+ async def askLLM(prompt):
41
+ output = await pipe(prompt,do_sample=False)
42
  return output
43
 
44
  @app.post("/ask_llm")
45
+ async def ask_llm_endpoint(prompt: str):
46
+ result = await askLLM(prompt)
47
  return {"result": result}