Update app.py
Browse files
app.py
CHANGED
@@ -37,9 +37,11 @@ def generate_caption(protein, prompt):
|
|
37 |
repr_layers=[36]
|
38 |
truncation_seq_length=1024
|
39 |
toks_per_batch=4096
|
40 |
-
|
41 |
dataset = FastaBatchedDataset([protein_name], [protein_seq])
|
|
|
42 |
batches = dataset.get_batch_indices(toks_per_batch, extra_toks_per_seq=1)
|
|
|
43 |
data_loader = torch.utils.data.DataLoader(
|
44 |
dataset, collate_fn=alphabet.get_batch_converter(truncation_seq_length), batch_sampler=batches
|
45 |
)
|
|
|
37 |
repr_layers=[36]
|
38 |
truncation_seq_length=1024
|
39 |
toks_per_batch=4096
|
40 |
+
print("start")
|
41 |
dataset = FastaBatchedDataset([protein_name], [protein_seq])
|
42 |
+
print("dataset prepared")
|
43 |
batches = dataset.get_batch_indices(toks_per_batch, extra_toks_per_seq=1)
|
44 |
+
print("batches prepared")
|
45 |
data_loader = torch.utils.data.DataLoader(
|
46 |
dataset, collate_fn=alphabet.get_batch_converter(truncation_seq_length), batch_sampler=batches
|
47 |
)
|