Update app.py
Browse files
app.py
CHANGED
@@ -249,28 +249,15 @@ def ACE(file):
|
|
249 |
elif output == 1:
|
250 |
Target = "high"
|
251 |
probability = probability[1]
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
summary = OrderedDict()
|
256 |
-
summary['Seq'] = test_sequences
|
257 |
-
summary['Target'] = Target
|
258 |
-
summary['Probability'] = probability_all
|
259 |
-
summary_df = pd.DataFrame(summary)
|
260 |
-
summary_df.to_csv('output.csv', index=False)
|
261 |
-
if len(test_sequences) > 1:
|
262 |
-
out_text = "Please download csv"
|
263 |
-
out_prob = "Please download csv"
|
264 |
-
else:
|
265 |
-
out_text = output
|
266 |
-
out_prob = probability
|
267 |
-
return 'output.csv', out_text, out_prob
|
268 |
|
269 |
with open("ACE.md", "r") as f:
|
270 |
description = f.read()
|
271 |
iface = gr.Interface(fn=ACE,
|
272 |
title="🚀DeepACE: ACE classification model",
|
273 |
inputs=gr.Textbox(show_label=False, placeholder="Enter peptide or protein", lines=4),
|
274 |
-
outputs= [
|
275 |
description=description)
|
276 |
iface.launch()
|
|
|
249 |
elif output == 1:
|
250 |
Target = "high"
|
251 |
probability = probability[1]
|
252 |
+
out_text = Target
|
253 |
+
out_prob = probability
|
254 |
+
return out_text, out_prob
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
255 |
|
256 |
with open("ACE.md", "r") as f:
|
257 |
description = f.read()
|
258 |
iface = gr.Interface(fn=ACE,
|
259 |
title="🚀DeepACE: ACE classification model",
|
260 |
inputs=gr.Textbox(show_label=False, placeholder="Enter peptide or protein", lines=4),
|
261 |
+
outputs= [gr.Textbox(show_label=False, placeholder="probability", lines=1)],
|
262 |
description=description)
|
263 |
iface.launch()
|