Fixed msa file upload
Browse files
app.py
CHANGED
|
@@ -59,8 +59,8 @@ def se_embed(sentence: str):
|
|
| 59 |
return model_output[0]
|
| 60 |
|
| 61 |
|
| 62 |
-
def msa_embed(
|
| 63 |
-
inputs = msa.greedy_select(
|
| 64 |
msa_transformer_batch_labels, msa_transformer_batch_strs, msa_transformer_batch_tokens = msa_transformer_batch_converter([inputs])
|
| 65 |
msa_transformer_batch_tokens = msa_transformer_batch_tokens.to(next(msa_transformer.parameters()).device)
|
| 66 |
|
|
@@ -210,7 +210,7 @@ def update_go(inp):
|
|
| 210 |
|
| 211 |
|
| 212 |
def update_msa(inp):
|
| 213 |
-
return str(msa_embed(msa.read_msa(inp)))
|
| 214 |
|
| 215 |
|
| 216 |
demo = gr.Blocks()
|
|
|
|
| 59 |
return model_output[0]
|
| 60 |
|
| 61 |
|
| 62 |
+
def msa_embed(sequences: list):
|
| 63 |
+
inputs = msa.greedy_select(sequences, num_seqs=128) # can change this to pass more/fewer sequences
|
| 64 |
msa_transformer_batch_labels, msa_transformer_batch_strs, msa_transformer_batch_tokens = msa_transformer_batch_converter([inputs])
|
| 65 |
msa_transformer_batch_tokens = msa_transformer_batch_tokens.to(next(msa_transformer.parameters()).device)
|
| 66 |
|
|
|
|
| 210 |
|
| 211 |
|
| 212 |
def update_msa(inp):
|
| 213 |
+
return str(msa_embed(msa.read_msa(inp.name)))
|
| 214 |
|
| 215 |
|
| 216 |
demo = gr.Blocks()
|