Update app.py
Browse files1 unmodified line2345667891011121314101516171 unmodified lineimport pandas as pdimport torchfrom transformers import AutoTokenizer, AutoModelForMaskedLMimport logging
# Initialize tokenizer and model globallylogging.getLogger("transformers.modeling_utils").setLevel(logging.ERROR)device = torch.device("cuda" if torch.cuda.is_available() else "cpu")print(f"Using device: {device}")
# Load the tokenizer and modelmodel_name = "ChatterjeeLab/FusOn-pLM"tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)model = AutoModelForMaskedLM.from_pretrained(model_name, trust_remote_code=True)device = torch.device("cuda" if torch.cuda.is_available() else "cpu")model.to(device)model.eval()
app.py+6-2