Update app.py
Browse files
app.py
CHANGED
|
@@ -34,7 +34,7 @@ def setup_seed(seed):
|
|
| 34 |
np.random.seed(seed)
|
| 35 |
random.seed(seed)
|
| 36 |
torch.backends.cudnn.deterministic = True
|
| 37 |
-
setup_seed(
|
| 38 |
|
| 39 |
|
| 40 |
batch_size = 1
|
|
@@ -210,9 +210,6 @@ def ACE(file):
|
|
| 210 |
else:
|
| 211 |
shutil.rmtree(pdb_path)
|
| 212 |
os.makedirs(pdb_path)
|
| 213 |
-
# df = pd.read_csv(seq_path)
|
| 214 |
-
# test_sequences = df["Seq"].tolist()
|
| 215 |
-
# test_Structure_index = df["Structure_index"].tolist()
|
| 216 |
|
| 217 |
test_sequences = [file]
|
| 218 |
test_Structure_index = [f"structure_{i}" for i in range(len(test_sequences))]
|
|
@@ -268,9 +265,12 @@ def ACE(file):
|
|
| 268 |
out_text = output
|
| 269 |
out_prob = probability
|
| 270 |
return 'output.csv', out_text, out_prob
|
| 271 |
-
|
|
|
|
|
|
|
| 272 |
iface = gr.Interface(fn=ACE,
|
| 273 |
title="🚀DeepACE: ACE classification model",
|
| 274 |
inputs=gr.Textbox(show_label=False, placeholder="Enter peptide or protein", lines=4),
|
| 275 |
-
outputs= ["file",gr.Textbox(show_label=False, placeholder="class", lines=1),gr.Textbox(show_label=False, placeholder="probability", lines=1)]
|
|
|
|
| 276 |
iface.launch()
|
|
|
|
| 34 |
np.random.seed(seed)
|
| 35 |
random.seed(seed)
|
| 36 |
torch.backends.cudnn.deterministic = True
|
| 37 |
+
setup_seed(4)
|
| 38 |
|
| 39 |
|
| 40 |
batch_size = 1
|
|
|
|
| 210 |
else:
|
| 211 |
shutil.rmtree(pdb_path)
|
| 212 |
os.makedirs(pdb_path)
|
|
|
|
|
|
|
|
|
|
| 213 |
|
| 214 |
test_sequences = [file]
|
| 215 |
test_Structure_index = [f"structure_{i}" for i in range(len(test_sequences))]
|
|
|
|
| 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()
|