nhathuy07 commited on
Commit
783b45d
·
verified ·
1 Parent(s): dcb60b6

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -1
main.py CHANGED
@@ -496,7 +496,7 @@ async def generate_questions(request):
496
  ptasks.append(__query_ml_predict(qtype=(QType.STMT if z%2==1 else QType.WH), content=_p['content'], header=_p['header'], l=request.path_params.get('lang', lang.VI_VN), num_qs=request.path_params.get('num_qs', 5 * _p.get('count', 1)), token_limit = int(1024 * _p.get('count', 1))))
497
 
498
  # __raw_outputs = [await p for p in ptasks]
499
- __raw_outputs = asyncio.gather(*ptasks)
500
 
501
  for pgph_i, o in enumerate(__raw_outputs):
502
  # print(o)
 
496
  ptasks.append(__query_ml_predict(qtype=(QType.STMT if z%2==1 else QType.WH), content=_p['content'], header=_p['header'], l=request.path_params.get('lang', lang.VI_VN), num_qs=request.path_params.get('num_qs', 5 * _p.get('count', 1)), token_limit = int(1024 * _p.get('count', 1))))
497
 
498
  # __raw_outputs = [await p for p in ptasks]
499
+ __raw_outputs = await asyncio.gather(*ptasks)
500
 
501
  for pgph_i, o in enumerate(__raw_outputs):
502
  # print(o)