Spaces:
Runtime error
Runtime error
import streamlit as st | |
from transformers import pipeline | |
model_name = 'fungi/deberta-v3-xsmall-squad2' | |
qa_pipe = pipeline('question-answering', model=model_name, tokenizer=model_name) | |
context = st.text_area('provide context') | |
question = st.text_area('ask your question') | |
if question and context: | |
out = qa_pipe(dict( | |
question=question, | |
context=context | |
)) | |
st.json(out) | |