Spaces:
Running
Running
reinstate exact ppl
Browse files
app.py
CHANGED
|
@@ -96,7 +96,7 @@ with gr.Blocks(title="ESM2 Protein Embeddings") as demo:
|
|
| 96 |
)
|
| 97 |
with gr.TabItem("Calculate Pseudo-Perplexity scores"):
|
| 98 |
with gr.Row():
|
| 99 |
-
|
| 100 |
ppl_approx_button = gr.Button("Calculate Approximate PPL", variant="primary", size="lg")
|
| 101 |
ppl_status = gr.Textbox(
|
| 102 |
label="Waiting for pseudo-perplexity calculation...",
|
|
@@ -128,11 +128,11 @@ with gr.Blocks(title="ESM2 Protein Embeddings") as demo:
|
|
| 128 |
outputs=[download_output, status_output]
|
| 129 |
)
|
| 130 |
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
|
| 137 |
ppl_approx_button.click(
|
| 138 |
fn=run_pipeline_with_selected_model,
|
|
|
|
| 96 |
)
|
| 97 |
with gr.TabItem("Calculate Pseudo-Perplexity scores"):
|
| 98 |
with gr.Row():
|
| 99 |
+
ppl_button = gr.Button("Calculate Exact PPL", variant="primary", size="lg")
|
| 100 |
ppl_approx_button = gr.Button("Calculate Approximate PPL", variant="primary", size="lg")
|
| 101 |
ppl_status = gr.Textbox(
|
| 102 |
label="Waiting for pseudo-perplexity calculation...",
|
|
|
|
| 128 |
outputs=[download_output, status_output]
|
| 129 |
)
|
| 130 |
|
| 131 |
+
ppl_button.click(
|
| 132 |
+
fn=run_pipeline_with_selected_model,
|
| 133 |
+
inputs=[input_files, model_dropdown, batch_size, max_duration, gr.State("ppl")],
|
| 134 |
+
outputs=[ppl_download, ppl_status]
|
| 135 |
+
)
|
| 136 |
|
| 137 |
ppl_approx_button.click(
|
| 138 |
fn=run_pipeline_with_selected_model,
|