paulhebo commited on
Commit
9fe158b
1 Parent(s): 69b8a32

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -270,7 +270,7 @@ def get_answer(task_type,question,sessionId,language,modelType,prompt,searchEngi
270
 
271
  confidence = ""
272
  print('query_docs_score_list len:',len(list(query_docs_score_list)),str(query_docs_score_list))
273
- if len(list(query_docs_score_list)) >= 0 and float(query_docs_score_list[0]) > 0:
274
  confidence += ("query_docs_score:" + str(query_docs_score_list) + '\n')
275
 
276
  query_answer_score = -1
@@ -281,7 +281,7 @@ def get_answer(task_type,question,sessionId,language,modelType,prompt,searchEngi
281
 
282
  answer_docs_score = -1
283
  print('answer_docs_score_list len:',len(list(answer_docs_score_list)),str(answer_docs_score_list))
284
- if len(list(answer_docs_score_list)) >= 0 and float(answer_docs_score_list[0]) > 0:
285
  confidence += ("answer_docs_score:" + str(answer_docs_score_list) + '\n')
286
 
287
  return answer,confidence,source_str,url,request_time
 
270
 
271
  confidence = ""
272
  print('query_docs_score_list len:',len(list(query_docs_score_list)),str(query_docs_score_list))
273
+ if len(list(query_docs_score_list)) > 0 and float(query_docs_score_list[0]) > 0:
274
  confidence += ("query_docs_score:" + str(query_docs_score_list) + '\n')
275
 
276
  query_answer_score = -1
 
281
 
282
  answer_docs_score = -1
283
  print('answer_docs_score_list len:',len(list(answer_docs_score_list)),str(answer_docs_score_list))
284
+ if len(list(answer_docs_score_list)) > 0 and float(answer_docs_score_list[0]) > 0:
285
  confidence += ("answer_docs_score:" + str(answer_docs_score_list) + '\n')
286
 
287
  return answer,confidence,source_str,url,request_time