yuxj commited on
Commit
f61f078
1 Parent(s): 0e80fa1

调整回答的时间日志

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -76,6 +76,7 @@ def on_click(question, kb_types):
76
  web_content = ''
77
  if '结合网络检索' in kb_types:
78
  web_content = web_search(question, 3)
 
79
  if len(local_content) > 0:
80
  if len(web_content) > 0:
81
  print('结合本地数据和网络检索 [' + time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) + ']: ')
@@ -85,7 +86,6 @@ def on_click(question, kb_types):
85
  print('结合网络检索 [' + time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) + ']: ')
86
  else:
87
  print('仅用模型数据 [' + time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) + ']: ')
88
- result = ask_question(question, local_content, web_content)
89
  print(f'{result}\n\n----------------------------')
90
 
91
  gc.collect()
 
76
  web_content = ''
77
  if '结合网络检索' in kb_types:
78
  web_content = web_search(question, 3)
79
+ result = ask_question(question, local_content, web_content)
80
  if len(local_content) > 0:
81
  if len(web_content) > 0:
82
  print('结合本地数据和网络检索 [' + time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) + ']: ')
 
86
  print('结合网络检索 [' + time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) + ']: ')
87
  else:
88
  print('仅用模型数据 [' + time.strftime("%Y-%m-%d %H:%M:%S", time.localtime()) + ']: ')
 
89
  print(f'{result}\n\n----------------------------')
90
 
91
  gc.collect()