MNGames commited on
Commit
40bc67f
1 Parent(s): 5786e96

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -11,7 +11,7 @@ model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
11
  def generate_questions(email):
12
  """Generates questions based on the input email."""
13
  # ... (existing code for encoding the email)
14
-
15
  # Check length instead of shape
16
  if len(inputs["input_ids"]) > 512: # Adjust maximum sequence length as needed
17
  print("WARNING: Input sequence exceeds maximum length. Truncating.")
 
11
  def generate_questions(email):
12
  """Generates questions based on the input email."""
13
  # ... (existing code for encoding the email)
14
+ inputs = tokenizer(email, return_tensors="pt")
15
  # Check length instead of shape
16
  if len(inputs["input_ids"]) > 512: # Adjust maximum sequence length as needed
17
  print("WARNING: Input sequence exceeds maximum length. Truncating.")