IlPakoZ commited on
Commit
a6d9600
·
verified ·
1 Parent(s): 34c0075

Update app.py with debug print

Browse files
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -79,20 +79,21 @@ class DrugTargetInteractionApp:
79
  # Tokenize inputs
80
  target_inputs = self.target_tokenizer(
81
  target_sequence,
82
- padding=True,
83
- truncation=True,
84
- max_length=max_length,
85
  return_tensors="pt"
86
  ).to(self.device)
87
 
88
  drug_inputs = self.drug_tokenizer(
89
  drug_smiles,
90
- padding=True,
91
- truncation=True,
92
- max_length=max_length,
93
  return_tensors="pt"
94
  ).to(self.device)
95
 
 
96
  # Make prediction
97
  with torch.no_grad():
98
  prediction = self.model(target_inputs, drug_inputs)
 
79
  # Tokenize inputs
80
  target_inputs = self.target_tokenizer(
81
  target_sequence,
82
+ padding="max_length",
83
+ truncation=True,
84
+ max_length=512,
85
  return_tensors="pt"
86
  ).to(self.device)
87
 
88
  drug_inputs = self.drug_tokenizer(
89
  drug_smiles,
90
+ padding="max_length",
91
+ truncation=True,
92
+ max_length=512,
93
  return_tensors="pt"
94
  ).to(self.device)
95
 
96
+ print(drug_inputs.shape, target_inputs.shape)
97
  # Make prediction
98
  with torch.no_grad():
99
  prediction = self.model(target_inputs, drug_inputs)