mawairon commited on
Commit
6432c04
1 Parent(s): 04805af

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -5
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, num_labels = 38)
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):