Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -171,8 +171,8 @@ def predict_test(model, tokenizer, embedding_model, df, question, index): # sen
|
|
171 |
|
172 |
Answer = model_pipeline(model, tokenizer,question,mostSimSegment)
|
173 |
|
174 |
-
if len(
|
175 |
-
|
176 |
|
177 |
# Find the start and end indices of mostSimSegment within mostSimContext
|
178 |
start_index = mostSimContext.find(Answer)
|
|
|
171 |
|
172 |
Answer = model_pipeline(model, tokenizer,question,mostSimSegment)
|
173 |
|
174 |
+
if len(Answer) <= 2:
|
175 |
+
Answer = mostSimSegment
|
176 |
|
177 |
# Find the start and end indices of mostSimSegment within mostSimContext
|
178 |
start_index = mostSimContext.find(Answer)
|