Update app.py
Browse files
app.py
CHANGED
@@ -111,6 +111,15 @@ def predict(cfg, sequence):
|
|
111 |
predictions = list(itertools.chain.from_iterable(predictions))
|
112 |
outputs["raw prediction values"] = predictions
|
113 |
outputs["binary prediction values"] = [1 if x > 0.5 else 0 for x in predictions]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
return outputs
|
115 |
|
116 |
|
|
|
111 |
predictions = list(itertools.chain.from_iterable(predictions))
|
112 |
outputs["raw prediction values"] = predictions
|
113 |
outputs["binary prediction values"] = [1 if x > 0.5 else 0 for x in predictions]
|
114 |
+
|
115 |
+
html_output = f"""
|
116 |
+
<div style='border: 2px solid #4CAF50; padding: 10px; border-radius: 10px;'>
|
117 |
+
<h3 style='color: #4CAF50;'>Protein: {cfg.sequence_col}</h3>
|
118 |
+
<p><strong>Stability:</strong> {outputs['raw prediction values']}</p>
|
119 |
+
<p><strong>Organism:</strong> {outputs['binary prediction values']}</p>
|
120 |
+
</div>
|
121 |
+
"""
|
122 |
+
|
123 |
return outputs
|
124 |
|
125 |
|