fungi's picture
use specific model
5b7bd18
raw
history blame contribute delete
No virus
397 Bytes
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)