You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Guys,
I need to know how to load the BioGPT model and run it. BioGPT exactly matches with my requirement and i was in searching online but i could't find any useful resources. Can you please help me on this model, Thanks in advanced.
The text was updated successfully, but these errors were encountered:
Have you tired using the huggingface code in the home page?
from transformers import pipeline, set_seed
from transformers import BioGptTokenizer, BioGptForCausalLM
model = BioGptForCausalLM.from_pretrained("microsoft/biogpt-large") # remove large if the model is too big
tokenizer = BioGptTokenizer.from_pretrained("microsoft/biogpt-large")
generator = pipeline('text-generation', model=model, tokenizer=tokenizer)
set_seed(42)
query = 'A patient with an inner ear infection should take antibiotic'
result = generator(query, max_length=300, num_return_sequences=2, do_sample=True)
print(result
```)
Hi Guys,
I need to know how to load the BioGPT model and run it. BioGPT exactly matches with my requirement and i was in searching online but i could't find any useful resources. Can you please help me on this model, Thanks in advanced.
The text was updated successfully, but these errors were encountered: