Spaces:
Sleeping
Sleeping
from transformers import AutoTokenizer, AutoModel, pipeline | |
from transformers.models.bert.configuration_bert import BertConfig | |
import gradio as gr | |
config = BertConfig.from_pretrained("czl/dnabert2") | |
tokenizer = AutoTokenizer.from_pretrained("czl/dnabert2", trust_remote_code=True) | |
model = AutoModel.from_pretrained("czl/dnabert2", trust_remote_code=True, config=config) | |
pipe = pipeline("feature-extraction", model=model, tokenizer=tokenizer) | |
demo = gr.Interface.from_pipeline(pipe) | |
demo.launch() |