Lisibonny commited on
Commit
1e55f2b
1 Parent(s): 066f50b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -140,6 +140,9 @@ def main():
140
  if (len(answer)>0):
141
  answer_start_scores = tf.nn.softmax(outputs.start_logits)
142
  answer_end_scores = tf.nn.softmax(outputs.end_logits)
 
 
 
143
  score = answer_start_scores*answer_end_scores
144
  st.write(score)
145
  cantidad_respuestas = cantidad_respuestas + 1
 
140
  if (len(answer)>0):
141
  answer_start_scores = tf.nn.softmax(outputs.start_logits)
142
  answer_end_scores = tf.nn.softmax(outputs.end_logits)
143
+ # Extract 5 greatest values fo start and end scores with indeces
144
+ answer_start_scores= tf.math.top_k(answer_start_scores, k=5)
145
+ answer_end_scores= ttf.math.top_k(answer_end_scores, k=5)
146
  score = answer_start_scores*answer_end_scores
147
  st.write(score)
148
  cantidad_respuestas = cantidad_respuestas + 1