DataRaptor commited on
Commit
bafba13
1 Parent(s): f5b2754

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -141,10 +141,10 @@ def main():
141
  clen = len(context)
142
  retrived = resp['data']['logs']['content']['retrival_model']['retrived_doc'][:retv_cnt]
143
  retrived_prob = resp['data']['logs']['content']['retrival_model']['retrived_prob'][:retv_cnt]
144
- retrived = [str(b) + ': ' + a for a, b in zip (retrived, retrived_prob)]
145
  retrived = '\n\n===============================\n\n'.join(retrived)
146
 
147
- context = [str(b) + ': ' + a for a, b in zip (context, context_prob)]
148
  context = '\n\n===============================\n\n'.join(context)
149
  response = f'###### Config: Context Checker Value: {ctx_checker_tmp}, LM Value: {lm_tmp}\n\n##### Retrived Context: {retrived}\n\n##### Matched Context: {clen}\n{context}\n\n##### Response:\n{response}'
150
 
 
141
  clen = len(context)
142
  retrived = resp['data']['logs']['content']['retrival_model']['retrived_doc'][:retv_cnt]
143
  retrived_prob = resp['data']['logs']['content']['retrival_model']['retrived_prob'][:retv_cnt]
144
+ retrived = [str(round(b, 3)) + ': ' + a for a, b in zip (retrived, retrived_prob)]
145
  retrived = '\n\n===============================\n\n'.join(retrived)
146
 
147
+ context = [str(round(b, 3)) + ': ' + a for a, b in zip (context, context_prob)]
148
  context = '\n\n===============================\n\n'.join(context)
149
  response = f'###### Config: Context Checker Value: {ctx_checker_tmp}, LM Value: {lm_tmp}\n\n##### Retrived Context: {retrived}\n\n##### Matched Context: {clen}\n{context}\n\n##### Response:\n{response}'
150