Update app.py
Browse files
app.py
CHANGED
@@ -51,8 +51,9 @@ def main():
|
|
51 |
answer_start_index = int(tf.math.argmax(outputs.start_logits, axis=-1)[0])
|
52 |
answer_end_index = int(tf.math.argmax(outputs.end_logits, axis=-1)[0])
|
53 |
predict_answer_tokens = inputs.input_ids[0, answer_start_index : answer_end_index + 1]
|
|
|
54 |
|
55 |
-
st.info(
|
56 |
|
57 |
else:
|
58 |
|
|
|
51 |
answer_start_index = int(tf.math.argmax(outputs.start_logits, axis=-1)[0])
|
52 |
answer_end_index = int(tf.math.argmax(outputs.end_logits, axis=-1)[0])
|
53 |
predict_answer_tokens = inputs.input_ids[0, answer_start_index : answer_end_index + 1]
|
54 |
+
answer=tokenizer.decode(predict_answer_tokens)
|
55 |
|
56 |
+
st.info(answer)
|
57 |
|
58 |
else:
|
59 |
|