| from DistilBERT import model_DB | |
| import streamlit as st | |
| from transformers import AutoTokenizer, AutoModel | |
| import torch | |
| device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') | |
| tokenizer = AutoTokenizer.from_pretrained('distilbert-base-uncased') | |
| def sentiment_analysis_DB(input): | |
| encoded_input = tokenizer(text, return_tensors='pt').to(device) | |
| model.to(device) | |
| ids = | |
| mask = | |
| token_type_ids = | |
| output = | |