Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -151,8 +151,10 @@ def load_protein_sequences(fasta_file):
|
|
| 151 |
def show_split(inputfile):
|
| 152 |
seqs = load_protein_sequences(inputfile)
|
| 153 |
htmls = []
|
|
|
|
| 154 |
for seq in seqs:
|
| 155 |
pdb_path = f'{seq.replace(" ", "_").replace(",","")}.pdb'
|
|
|
|
| 156 |
html = fold_protein_wpdb(seqs[seq], pdb_path)
|
| 157 |
x = f"""<h3>>{seq}</h3>
|
| 158 |
<br>
|
|
@@ -160,7 +162,7 @@ def show_split(inputfile):
|
|
| 160 |
htmls.append(x+html)
|
| 161 |
final = "\n<br>\n".join(htmls)
|
| 162 |
realhtml = "<div>\n"+final+"\n</div>"
|
| 163 |
-
return realhtml
|
| 164 |
|
| 165 |
iface = gr.Interface(
|
| 166 |
title="SingleProteinviz",
|
|
@@ -185,7 +187,7 @@ demo1 = gr.Interface(
|
|
| 185 |
inputs=gr.File(
|
| 186 |
label="FASTA File With Protein Sequences",
|
| 187 |
),
|
| 188 |
-
outputs= gr.HTML(label="Protein 3D models"),
|
| 189 |
examples = ["proteins.fasta"]
|
| 190 |
)
|
| 191 |
|
|
|
|
| 151 |
def show_split(inputfile):
|
| 152 |
seqs = load_protein_sequences(inputfile)
|
| 153 |
htmls = []
|
| 154 |
+
pdb_paths = []
|
| 155 |
for seq in seqs:
|
| 156 |
pdb_path = f'{seq.replace(" ", "_").replace(",","")}.pdb'
|
| 157 |
+
pdb_paths.append(pdb_path)
|
| 158 |
html = fold_protein_wpdb(seqs[seq], pdb_path)
|
| 159 |
x = f"""<h3>>{seq}</h3>
|
| 160 |
<br>
|
|
|
|
| 162 |
htmls.append(x+html)
|
| 163 |
final = "\n<br>\n".join(htmls)
|
| 164 |
realhtml = "<div>\n"+final+"\n</div>"
|
| 165 |
+
return realhtml, pdb_paths
|
| 166 |
|
| 167 |
iface = gr.Interface(
|
| 168 |
title="SingleProteinviz",
|
|
|
|
| 187 |
inputs=gr.File(
|
| 188 |
label="FASTA File With Protein Sequences",
|
| 189 |
),
|
| 190 |
+
outputs= [gr.HTML(label="Protein 3D models"), Molecule3D(label="Molecular 3D models", reps=reps, file_count="multiple")],
|
| 191 |
examples = ["proteins.fasta"]
|
| 192 |
)
|
| 193 |
|