Spaces:
Runtime error
Runtime error
File size: 500 Bytes
ec7b89f a3339ce |
1 2 3 4 5 6 7 8 9 |
import gradio as gr
from transformers import pipeline, set_seed
from transformers import BioGptTokenizer, BioGptForCausalLM
model = BioGptForCausalLM.from_pretrained("microsoft/biogpt")
tokenizer = BioGptTokenizer.from_pretrained("microsoft/biogpt")
generator = pipeline('text-generation', model=model, tokenizer=tokenizer)
set_seed(42)
generator("Tirzepatide is a new drug used to treat", max_length=20, num_return_sequences=5, do_sample=True)
# gr.Interface.load("models/microsoft/biogpt").launch() |