Skip to content

Commit

Permalink
how much top to include
Browse files Browse the repository at this point in the history
  • Loading branch information
dcolinmorgan committed Mar 28, 2024
1 parent 5556b07 commit 88a59c9
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions DOTS/feat.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,18 @@


# # Load models and tokenizers
# model_name = "distilroberta-base"
# model = AutoModel.from_pretrained(model_name)
# tokenizer = AutoTokenizer.from_pretrained(model_name)
# # !python -m spacy download en_core_web_sm
# nlp = spacy.load('en_core_web_sm')
model_name = "distilroberta-base"
model = AutoModel.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)
# !python -m spacy download en_core_web_sm
nlp = spacy.load('en_core_web_sm')

# # Define constants
# n_gram_range = (1, 2)
# stop_words = "english"
# embeddings=[]
# device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
# model.to(device)
n_gram_range = (1, 2)
stop_words = "english"
embeddings=[]
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
model.to(device)

# Define functions
def chunk_text(text, max_len):
Expand Down

0 comments on commit 88a59c9

Please sign in to comment.