Spaces:
Sleeping
Sleeping
Update requirements and make necessary code changes
Browse files- .ipynb_checkpoints/app-checkpoint.py +2 -2
- app.py +2 -2
.ipynb_checkpoints/app-checkpoint.py
CHANGED
|
@@ -111,7 +111,7 @@ def predict_protein_sequence(test_one_letter_sequence):
|
|
| 111 |
|
| 112 |
normalized_scores = normalize_scores(logits)
|
| 113 |
|
| 114 |
-
result_str = "\n".join([f"{aa}: {score:.2f}" for aa, score in zip(test_one_letter_sequence, normalized_scores
|
| 115 |
|
| 116 |
return result_str
|
| 117 |
|
|
@@ -119,7 +119,7 @@ def predict_protein_sequence(test_one_letter_sequence):
|
|
| 119 |
interface = gr.Interface(
|
| 120 |
fn=predict_protein_sequence,
|
| 121 |
inputs=gr.Textbox(lines=2, placeholder="Enter protein sequence here..."),
|
| 122 |
-
outputs=gr.JSON(), # Use gr.JSON() for list or array-like outputs
|
| 123 |
title="Protein sequence - Binding site prediction",
|
| 124 |
description="Enter a protein sequence to predict its possible binding sites.",
|
| 125 |
)
|
|
|
|
| 111 |
|
| 112 |
normalized_scores = normalize_scores(logits)
|
| 113 |
|
| 114 |
+
result_str = "\n".join([f"{aa}: {score:.2f}" for aa, score in zip(test_one_letter_sequence, normalized_scores)])
|
| 115 |
|
| 116 |
return result_str
|
| 117 |
|
|
|
|
| 119 |
interface = gr.Interface(
|
| 120 |
fn=predict_protein_sequence,
|
| 121 |
inputs=gr.Textbox(lines=2, placeholder="Enter protein sequence here..."),
|
| 122 |
+
outputs=gr.Textbox() #gr.JSON(), # Use gr.JSON() for list or array-like outputs
|
| 123 |
title="Protein sequence - Binding site prediction",
|
| 124 |
description="Enter a protein sequence to predict its possible binding sites.",
|
| 125 |
)
|
app.py
CHANGED
|
@@ -111,7 +111,7 @@ def predict_protein_sequence(test_one_letter_sequence):
|
|
| 111 |
|
| 112 |
normalized_scores = normalize_scores(logits)
|
| 113 |
|
| 114 |
-
result_str = "\n".join([f"{aa}: {score:.2f}" for aa, score in zip(test_one_letter_sequence, normalized_scores
|
| 115 |
|
| 116 |
return result_str
|
| 117 |
|
|
@@ -119,7 +119,7 @@ def predict_protein_sequence(test_one_letter_sequence):
|
|
| 119 |
interface = gr.Interface(
|
| 120 |
fn=predict_protein_sequence,
|
| 121 |
inputs=gr.Textbox(lines=2, placeholder="Enter protein sequence here..."),
|
| 122 |
-
outputs=gr.JSON(), # Use gr.JSON() for list or array-like outputs
|
| 123 |
title="Protein sequence - Binding site prediction",
|
| 124 |
description="Enter a protein sequence to predict its possible binding sites.",
|
| 125 |
)
|
|
|
|
| 111 |
|
| 112 |
normalized_scores = normalize_scores(logits)
|
| 113 |
|
| 114 |
+
result_str = "\n".join([f"{aa}: {score:.2f}" for aa, score in zip(test_one_letter_sequence, normalized_scores)])
|
| 115 |
|
| 116 |
return result_str
|
| 117 |
|
|
|
|
| 119 |
interface = gr.Interface(
|
| 120 |
fn=predict_protein_sequence,
|
| 121 |
inputs=gr.Textbox(lines=2, placeholder="Enter protein sequence here..."),
|
| 122 |
+
outputs=gr.Textbox() #gr.JSON(), # Use gr.JSON() for list or array-like outputs
|
| 123 |
title="Protein sequence - Binding site prediction",
|
| 124 |
description="Enter a protein sequence to predict its possible binding sites.",
|
| 125 |
)
|