oucgc1996 commited on
Commit
9cc44f2
1 Parent(s): 3a1dea8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -68,9 +68,8 @@ def AMP(file):
68
  out_probability.extend(np.max(np.array(predict.cpu()),axis=1).tolist())
69
  # out_probability.extend(np.array(predict.cpu())[:, -1].tolist())
70
  test_argmax = np.argmax(predict.cpu(), axis=1).tolist()
71
- out.extend(test_argmax)
72
  id2str = {0:"non-AMP", 1:"AMP"}
73
- return id2str[out], out_probability
74
 
75
  iface = gr.Interface(fn=AMP,
76
  inputs="text",
 
68
  out_probability.extend(np.max(np.array(predict.cpu()),axis=1).tolist())
69
  # out_probability.extend(np.array(predict.cpu())[:, -1].tolist())
70
  test_argmax = np.argmax(predict.cpu(), axis=1).tolist()
 
71
  id2str = {0:"non-AMP", 1:"AMP"}
72
+ return id2str[test_argmax], out_probability
73
 
74
  iface = gr.Interface(fn=AMP,
75
  inputs="text",