oucgc1996 commited on
Commit
822cac5
·
verified ·
1 Parent(s): a464271

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -17
app.py CHANGED
@@ -249,28 +249,15 @@ def ACE(file):
249
  elif output == 1:
250
  Target = "high"
251
  probability = probability[1]
252
- print(Target, probability)
253
- probability_all.append(probability)
254
- Target_all.append(Target)
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= ["file",gr.Textbox(show_label=False, placeholder="class", lines=1),gr.Textbox(show_label=False, placeholder="probability", lines=1)],
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()