File size: 364 Bytes
8a947c8 a0c568b 3c6cda5 c1fda97 b1581c6 a0c568b b1581c6 a0c568b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
from transformers import pipeline
import streamlit as st
question_answerer = pipeline("question-answering", model="distilbert-base-cased-distilled-squad")
cont = st.text_area("Give a context:")
quest = st.text_input("Your question:")
if st.button("OK"):
response = question_answerer(
question=quest,
context=cont
)
st.write(response) |