Lisibonny commited on
Commit
e6f57be
1 Parent(s): 13f179b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -146,8 +146,9 @@ def main():
146
  end_probabilities = tf.nn.softmax(outputs.end_logits, axis=-1)[0]
147
  scores = start_probabilities[:, None] * end_probabilities[None, :]
148
  scores = tf.linalg.band_part(scores, 0, -1)
 
149
  st.write(scores)
150
- max_index = tf.print(tf.math.argmax(scores))
151
  st.write(max_index)
152
  start_index = max_index // scores.shape[1]
153
  end_index = max_index % scores.shape[1]
 
146
  end_probabilities = tf.nn.softmax(outputs.end_logits, axis=-1)[0]
147
  scores = start_probabilities[:, None] * end_probabilities[None, :]
148
  scores = tf.linalg.band_part(scores, 0, -1)
149
+ scores = scores.flatten()
150
  st.write(scores)
151
+ max_index = np.argmax(scores)
152
  st.write(max_index)
153
  start_index = max_index // scores.shape[1]
154
  end_index = max_index % scores.shape[1]