Binarybardakshat/SVLM-ACL-DATASET
Viewer • Updated • 2.15k • 11
How to use Binarybardakshat/SVLM with Transformers:
# Load model directly
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
tokenizer = AutoTokenizer.from_pretrained("Binarybardakshat/SVLM")
model = AutoModelForSeq2SeqLM.from_pretrained("Binarybardakshat/SVLM")This model, SVLM, is designed to answer questions based on research papers from the ACL dataset. It leverages the BART architecture to generate precise answers from scientific abstracts.
To use this model with the Hugging Face Interface API:
from transformers import AutoTokenizer, TFAutoModelForSeq2SeqLM
# Load the model and tokenizer
tokenizer = AutoTokenizer.from_pretrained("Binarybardakshat/SVLM")
model = TFAutoModelForSeq2SeqLM.from_pretrained("Binarybardakshat/SVLM")
# Example input
input_text = "What is the main contribution of the paper titled 'Your Paper Title'?"
# Tokenize input
inputs = tokenizer(input_text, return_tensors="tf", padding=True, truncation=True)
# Generate answer
outputs = model.generate(inputs.input_ids, max_length=50, num_beams=5, early_stopping=True)
answer = tokenizer.decode(outputs[0], skip_special_tokens=True)
print("Answer:", answer)
# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("Binarybardakshat/SVLM") model = AutoModelForSeq2SeqLM.from_pretrained("Binarybardakshat/SVLM")