Spaces:
Sleeping
Sleeping
File size: 432 Bytes
0db253f 3aaaf7b 0db253f b4d0d8e |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
import subprocess
import sys
def install(package):
subprocess.check_call([sys.executable, "-m", "pip", "install", "--user", package])
install("transformers")
from transformers import pipeline
def bert(context, question):
question_answerer = pipeline("question-answering", "alexandre-huynh/bert-base-uncased-finetuned-squad-single-epoch", framework="tf")
return(question_answerer(context=context, question=question)) |