dev2004v commited on
Commit
9702570
·
verified ·
1 Parent(s): 7432e1a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -6
app.py CHANGED
@@ -156,14 +156,9 @@ async def answer_question(request: QuestionRequest):
156
  use_sentence_structure=DEFAULT_SENTENCE_STRUCTURE
157
  )
158
 
159
- answer_text = result['answer'].strip()
160
-
161
- if not answer_text:
162
- answer_text = "Answer not found in the given context."
163
-
164
  return QuestionResponse(
165
  question=request.question,
166
- answer=answer_text,
167
  p_gen_score=result['p_gen_score'],
168
  entities_detected=entities
169
  )
 
156
  use_sentence_structure=DEFAULT_SENTENCE_STRUCTURE
157
  )
158
 
 
 
 
 
 
159
  return QuestionResponse(
160
  question=request.question,
161
+ answer=result['answer'],
162
  p_gen_score=result['p_gen_score'],
163
  entities_detected=entities
164
  )