Spaces:
Running
Running
pass model and tokenizer as input to pipeline and add batch_size
Browse files
app.py
CHANGED
|
@@ -77,6 +77,13 @@ with gr.Blocks(title="ESM2 Protein Embeddings") as demo:
|
|
| 77 |
value=list(MODELS.values())[0],
|
| 78 |
label="Select Model"
|
| 79 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 80 |
|
| 81 |
|
| 82 |
current_key = [key for key, value in MODELS.items() if value == model_dropdown.value][0]
|
|
@@ -96,7 +103,7 @@ with gr.Blocks(title="ESM2 Protein Embeddings") as demo:
|
|
| 96 |
|
| 97 |
submit_btn.click(
|
| 98 |
fn=full_embedding_pipeline,
|
| 99 |
-
inputs=[input_files],
|
| 100 |
outputs=[download_output, status_output]
|
| 101 |
)
|
| 102 |
|
|
|
|
| 77 |
value=list(MODELS.values())[0],
|
| 78 |
label="Select Model"
|
| 79 |
)
|
| 80 |
+
batch_size = gr.Slider(
|
| 81 |
+
minimum=1,
|
| 82 |
+
maximum=128,
|
| 83 |
+
step=1,
|
| 84 |
+
value=32,
|
| 85 |
+
label="Batch Size"
|
| 86 |
+
)
|
| 87 |
|
| 88 |
|
| 89 |
current_key = [key for key, value in MODELS.items() if value == model_dropdown.value][0]
|
|
|
|
| 103 |
|
| 104 |
submit_btn.click(
|
| 105 |
fn=full_embedding_pipeline,
|
| 106 |
+
inputs=[input_files, model_to_use, tokenizer_to_use, batch_size],
|
| 107 |
outputs=[download_output, status_output]
|
| 108 |
)
|
| 109 |
|