Spaces:
Running
Running
reinitialize importance scores
Browse files
app.py
CHANGED
|
@@ -379,9 +379,6 @@ def generate_heatmap(protein_fasta):
|
|
| 379 |
original_output = model(encoded_input["input_ids"], attention_mask=encoded_input["attention_mask"])
|
| 380 |
original_probabilities = F.softmax(original_output.logits, dim=1).cpu().numpy()[0]
|
| 381 |
|
| 382 |
-
# Initialize an array to hold the importance scores
|
| 383 |
-
importance_scores = np.zeros((len(protein_sequence), len(original_probabilities)))
|
| 384 |
-
|
| 385 |
# Define the size of each group
|
| 386 |
group_size = 10 # You can change this
|
| 387 |
|
|
@@ -440,7 +437,7 @@ with gr.Blocks() as app:
|
|
| 440 |
with gr.Tab("Single Sequence Prediction"):
|
| 441 |
with gr.Row().style(equal_height=True):
|
| 442 |
with gr.Column():
|
| 443 |
-
sequence = gr.inputs.Textbox(lines=
|
| 444 |
with gr.Column():
|
| 445 |
with gr.Accordion("Example:"):
|
| 446 |
gr.Markdown("""
|
|
|
|
| 379 |
original_output = model(encoded_input["input_ids"], attention_mask=encoded_input["attention_mask"])
|
| 380 |
original_probabilities = F.softmax(original_output.logits, dim=1).cpu().numpy()[0]
|
| 381 |
|
|
|
|
|
|
|
|
|
|
| 382 |
# Define the size of each group
|
| 383 |
group_size = 10 # You can change this
|
| 384 |
|
|
|
|
| 437 |
with gr.Tab("Single Sequence Prediction"):
|
| 438 |
with gr.Row().style(equal_height=True):
|
| 439 |
with gr.Column():
|
| 440 |
+
sequence = gr.inputs.Textbox(lines=16, placeholder='Enter Protein Sequence Here...', label="Protein Sequence")
|
| 441 |
with gr.Column():
|
| 442 |
with gr.Accordion("Example:"):
|
| 443 |
gr.Markdown("""
|