Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -5,11 +5,7 @@ from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
|
5 |
# Load the Hugging Face model and tokenizer
|
6 |
model_name = 'AIRI-Institute/gena-lm-bert-base-lastln-t2t' # Replace with the actual model name
|
7 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
8 |
-
model = AutoModelForSequenceClassification.from_pretrained(model_name
|
9 |
-
|
10 |
-
# Ensure the model has the correct number of classes
|
11 |
-
num_classes = model.config.num_labels
|
12 |
-
assert num_classes == 38, f"The model has {num_classes} classes, but 38 were expected."
|
13 |
|
14 |
# Define a function to process the DNA sequence
|
15 |
def analyze_dna(sequence):
|
|
|
5 |
# Load the Hugging Face model and tokenizer
|
6 |
model_name = 'AIRI-Institute/gena-lm-bert-base-lastln-t2t' # Replace with the actual model name
|
7 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
8 |
+
model = AutoModelForSequenceClassification.from_pretrained(model_name)
|
|
|
|
|
|
|
|
|
9 |
|
10 |
# Define a function to process the DNA sequence
|
11 |
def analyze_dna(sequence):
|