Spaces:
Sleeping
Sleeping
from transformers import pipeline | |
def squeezebert(context, question): | |
# Define the specific model and tokenizer for SqueezeBERT | |
model_name = "ALOQAS/squeezebert-uncased-finetuned-squad-v2" | |
pip = pipeline('question-answering', model=model_name, tokenizer=model_name) | |
return pip(context=context, question=question) | |
def bert(context, question): | |
# Define the specific model and tokenizer for BERT | |
model_name = "ALOQAS/bert-large-uncased-finetuned-squad-v2" | |
pip = pipeline('question-answering', model=model_name, tokenizer=model_name) | |
return pip(context=context, question=question) | |
def deberta(context, question): | |
# Define the specific model and tokenizer for DeBERTa | |
model_name = "ALOQAS/deberta-large-finetuned-squad-v2" | |
pip = pipeline('question-answering', model=model_name, tokenizer=model_name) | |
return pip(context=context, question=question) | |