Ce Gao commited on
Commit
47037f4
β€’
1 Parent(s): e72271e

fix: Fix issue about log dir

Browse files

Signed-off-by: Ce Gao <cegao@tensorchord.ai>

Files changed (1) hide show
  1. awesome_chat.py +3 -3
awesome_chat.py CHANGED
@@ -36,8 +36,8 @@ if __name__ != "__main__":
36
 
37
  config = yaml.load(open(args.config, "r"), Loader=yaml.FullLoader)
38
 
39
- # if not os.path.exists("logs"):
40
- # os.mkdir("logs")
41
 
42
  now = datetime.datetime.now().strftime("%Y-%m-%d-%H-%M-%S")
43
 
@@ -930,4 +930,4 @@ def chat_huggingface(messages, openaikey = None, huggingfacetoken = None, return
930
  answer = {"message": response}
931
  record_case(success=True, **{"input": input, "task": task_str, "results": results, "response": response, "during": during, "op":"response"})
932
  logger.info(f"response: {response}")
933
- return response, results
 
36
 
37
  config = yaml.load(open(args.config, "r"), Loader=yaml.FullLoader)
38
 
39
+ if not os.path.exists("logs"):
40
+ os.mkdir("logs")
41
 
42
  now = datetime.datetime.now().strftime("%Y-%m-%d-%H-%M-%S")
43
 
 
930
  answer = {"message": response}
931
  record_case(success=True, **{"input": input, "task": task_str, "results": results, "response": response, "during": during, "op":"response"})
932
  logger.info(f"response: {response}")
933
+ return response, results