Spaces:
Runtime error
Runtime error
igashov
commited on
Commit
·
4f94923
1
Parent(s):
e847c29
output files
Browse files
app.py
CHANGED
|
@@ -146,7 +146,10 @@ def generate(input_file):
|
|
| 146 |
|
| 147 |
generated_molecule = read_molecule_content(out_sdf)
|
| 148 |
html = HTML_TEMPLATE.format(molecule=generated_molecule, fmt='sdf')
|
| 149 |
-
return
|
|
|
|
|
|
|
|
|
|
| 150 |
|
| 151 |
|
| 152 |
demo = gr.Blocks()
|
|
@@ -163,11 +166,12 @@ with demo:
|
|
| 163 |
|
| 164 |
gr.Markdown('')
|
| 165 |
visualization = gr.HTML()
|
|
|
|
| 166 |
|
| 167 |
button.click(
|
| 168 |
fn=generate,
|
| 169 |
inputs=[input_file],
|
| 170 |
-
outputs=[visualization],
|
| 171 |
)
|
| 172 |
|
| 173 |
demo.launch()
|
|
|
|
| 146 |
|
| 147 |
generated_molecule = read_molecule_content(out_sdf)
|
| 148 |
html = HTML_TEMPLATE.format(molecule=generated_molecule, fmt='sdf')
|
| 149 |
+
return [
|
| 150 |
+
IFRAME_TEMPLATE.format(html=html),
|
| 151 |
+
out_sdf,
|
| 152 |
+
]
|
| 153 |
|
| 154 |
|
| 155 |
demo = gr.Blocks()
|
|
|
|
| 166 |
|
| 167 |
gr.Markdown('')
|
| 168 |
visualization = gr.HTML()
|
| 169 |
+
output_files = gr.File(file_count="single", label="Output files")
|
| 170 |
|
| 171 |
button.click(
|
| 172 |
fn=generate,
|
| 173 |
inputs=[input_file],
|
| 174 |
+
outputs=[visualization, output_files],
|
| 175 |
)
|
| 176 |
|
| 177 |
demo.launch()
|