Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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[
|
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",
|