CoolFace
Modelpublic

epatyukova/matscibert-polymer-extractive-QA

sourceHugging Faceupdated 8mo agoView on Hugging Face
0likes22downloads
Model Card

library_name: transformers tags:

  • —autotrain
  • —question-answering base_model: m3rg-iitd/matscibert widget:
  • —text: "What polymerisation method was used for synthesis?" context: "The polyester was synthesysed using polycondensation in melt from the mixture of monomers quinoline-2,4- dicarboxylic acid and 1,2-Propanediol." ---

Model Trained Using AutoTrain

  • —Problem type: Extractive Question Answering

Validation

epatyukova/matscibert-polymer-extractive-QA

EM: 81.18% F1: 82.45%

Usage

python
from transformers import AutoTokenizer, AutoModelForQuestionAnswering
from transformers import pipeline


model_name = "epatyukova/matscibert-polymer-extractive-QA"

model = AutoModelForQuestionAnswering.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)

qa = pipeline(
    "question-answering",
    model=model,
    tokenizer=tokenizer,
    device="mps"  # or -1 for CPU
)

question, context = "What polymerisation method was used for synthesis?", "The polyester was synthesized using polycondensation in the melt from the mixture of monomers quinoline-2,4- dicarboxylic acid and 1,2-Propanediol."
test={'question': question,'context': context}

qa(test)