Spaces:
Paused
Paused
osanseviero
commited on
Commit
β’
0670a40
1
Parent(s):
1620a67
Update app.py
Browse files
app.py
CHANGED
@@ -108,8 +108,8 @@ def update(sequence=DEFAULT_SEQ):
|
|
108 |
tmp = tempfile.NamedTemporaryFile()
|
109 |
with open(tmp.name, "w") as f:
|
110 |
f.write(pdb_string)
|
111 |
-
|
112 |
-
return molecule(tmp.name)
|
113 |
|
114 |
|
115 |
def suggest(option):
|
@@ -152,8 +152,8 @@ with demo:
|
|
152 |
inp = gr.Textbox(label="Protein sequence", lines=3, value=DEFAULT_SEQ, placeholder="Write your protein sequence here...")
|
153 |
btn = gr.Button("π¬ Predict Structure ").style(full_width=False)
|
154 |
mol = gr.HTML(update)
|
155 |
-
|
156 |
-
btn.click(fn=update, inputs=inp, outputs=mol)
|
157 |
|
158 |
name.change(fn=suggest, inputs=name, outputs=inp)
|
159 |
name.change(fn=lambda :"", inputs=None, outputs=mol)
|
|
|
108 |
tmp = tempfile.NamedTemporaryFile()
|
109 |
with open(tmp.name, "w") as f:
|
110 |
f.write(pdb_string)
|
111 |
+
print("File name", tmp.name)
|
112 |
+
return molecule(tmp.name), tmp.name
|
113 |
|
114 |
|
115 |
def suggest(option):
|
|
|
152 |
inp = gr.Textbox(label="Protein sequence", lines=3, value=DEFAULT_SEQ, placeholder="Write your protein sequence here...")
|
153 |
btn = gr.Button("π¬ Predict Structure ").style(full_width=False)
|
154 |
mol = gr.HTML(update)
|
155 |
+
download = gr.File(label="Download file")
|
156 |
+
btn.click(fn=update, inputs=inp, outputs=[mol, download])
|
157 |
|
158 |
name.change(fn=suggest, inputs=name, outputs=inp)
|
159 |
name.change(fn=lambda :"", inputs=None, outputs=mol)
|