Sirinoot commited on
Commit
1f0e176
·
verified ·
1 Parent(s): 382dab4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -162,12 +162,12 @@ def predict_test(model, tokenizer, embedding_model, df, question, index): # sen
162
  mostSimSegment = segments[_indices[0][0]]
163
 
164
  Answer = model_pipeline(model, tokenizer,question,mostSimSegment)
165
-
166
  # Find the start and end indices of mostSimSegment within mostSimContext
167
  start_index = mostSimContext.find(Answer)
168
  end_index = start_index + len(Answer)
169
 
170
- print(f"answer {len(answer)} => {answer} || startIndex =>{start_index} || endIndex =>{end_index}")
171
  print(f"mostSimContext{len(mostSimContext)}=>{mostSimContext}\nsegments{len(segments)}=>{segments}\nmostSimSegment{len(mostSimSegment)}=>{mostSimSegment}")
172
 
173
  _time = time.time() - t
 
162
  mostSimSegment = segments[_indices[0][0]]
163
 
164
  Answer = model_pipeline(model, tokenizer,question,mostSimSegment)
165
+
166
  # Find the start and end indices of mostSimSegment within mostSimContext
167
  start_index = mostSimContext.find(Answer)
168
  end_index = start_index + len(Answer)
169
 
170
+ print(f"answer {len(Answer)} => {Answer} || startIndex =>{start_index} || endIndex =>{end_index}")
171
  print(f"mostSimContext{len(mostSimContext)}=>{mostSimContext}\nsegments{len(segments)}=>{segments}\nmostSimSegment{len(mostSimSegment)}=>{mostSimSegment}")
172
 
173
  _time = time.time() - t