Downloads · 30 days
31
27% of all-time downloads
lamtdse61743/Roberta-Fanshawe
Roberta-Fanshawe is a question answering model from lamtdse61743. Use it when the input is a question plus a passage. The card lists the license as mit.
This is a fine-tuned version of deepset/roberta-base-squad2 on a custom Q&A dataset about Fanshawe College programs and admission requirements. It answers questions related to Fanshawe’s educational offerings in a hel…
Downloads · 30 days
31
27% of all-time downloads
All-time downloads
115
Public
Parameters
124M
496 MB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors496 MB · 99%
From the Hugging Face model README
This is a fine-tuned version of deepset/roberta-base-squad2 on a custom Q&A dataset about Fanshawe College programs and admission requirements. It answers questions related to Fanshawe’s educational offerings in a helpful, focused way.
Disclaimer: This model is not affiliated with or officially endorsed by Fanshawe College. It was built using publicly available information for educational purposes.
Base Model: deepset/roberta-base-squad2 Fine-tuned on: 3,500 QA pairs about Fanshawe College License: MIT (free for any use with attribution) Author: @lamtdse61743
This model may not reflect the most current information from Fanshawe College. Always refer to the official Fanshawe College website for accurate and up-to-date program information.
from transformers import AutoTokenizer, AutoModelForQuestionAnswering
import torch
tokenizer = AutoTokenizer.from_pretrained("lamtdse61743/Roberta-Fanshawe")
model = AutoModelForQuestionAnswering.from_pretrained("lamtdse61743/Roberta-Fanshawe")
def ask_question(question, context):
inputs = tokenizer(question, context, return_tensors="pt")
with torch.no_grad():
outputs = model(**inputs)
start = torch.argmax(outputs.start_logits)
end = torch.argmax(outputs.end_logits) + 1
return tokenizer.decode(inputs["input_ids"][0][start:end], skip_special_tokens=True)
context = "Fanshawe College requires a minimum GPA of 2.5 for admission into its Construction Project Management program."
question = "What is the GPA requirement for admission?"
print(ask_question(question, context))