Update app.py
Browse files
app.py
CHANGED
@@ -31,7 +31,9 @@ def generate_caption(protein, prompt):
|
|
31 |
esm_emb = run_demo(protein_name='protein_name', protein_seq=protein,
|
32 |
model=model_esm, alphabet=alphabet,
|
33 |
include='per_tok', repr_layers=36, truncation_seq_length=1024)
|
|
|
34 |
esm_emb = F.pad(esm_emb.t(), (0, 1024 - len(esm_emb))).t().to('cuda')
|
|
|
35 |
samples = {'name': ['protein_name'],
|
36 |
'image': torch.unsqueeze(esm_emb, dim=0),
|
37 |
'text_input': ['none'],
|
|
|
31 |
esm_emb = run_demo(protein_name='protein_name', protein_seq=protein,
|
32 |
model=model_esm, alphabet=alphabet,
|
33 |
include='per_tok', repr_layers=36, truncation_seq_length=1024)
|
34 |
+
print("esm embedding generated")
|
35 |
esm_emb = F.pad(esm_emb.t(), (0, 1024 - len(esm_emb))).t().to('cuda')
|
36 |
+
print("esm embedding processed")
|
37 |
samples = {'name': ['protein_name'],
|
38 |
'image': torch.unsqueeze(esm_emb, dim=0),
|
39 |
'text_input': ['none'],
|