ApsidalSolid4 commited on
Commit
3f8bf20
·
verified ·
1 Parent(s): 45c7a53

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -67,16 +67,15 @@ class TextClassifier:
67
  self.model = None
68
  self.processor = TextWindowProcessor()
69
  self.initialize_model()
70
-
71
  def initialize_model(self):
72
  """Initialize the model and tokenizer."""
73
  logger.info("Initializing model and tokenizer...")
74
 
75
- # Modified tokenizer initialization
76
  self.tokenizer = AutoTokenizer.from_pretrained(
77
  self.model_name,
78
- use_fast=True, # Change this to True
79
- trust_remote_code=True # Add this parameter
80
  )
81
 
82
  # First initialize the base model
 
67
  self.model = None
68
  self.processor = TextWindowProcessor()
69
  self.initialize_model()
70
+
71
  def initialize_model(self):
72
  """Initialize the model and tokenizer."""
73
  logger.info("Initializing model and tokenizer...")
74
 
75
+ # Remove the use_fast parameter completely
76
  self.tokenizer = AutoTokenizer.from_pretrained(
77
  self.model_name,
78
+ model_max_length=MAX_LENGTH
 
79
  )
80
 
81
  # First initialize the base model