Spaces:
Paused
Paused
igashov commited on
Commit ·
4ff7ca7
1
Parent(s): ce8384d
dataset
Browse files
app.py
CHANGED
|
@@ -163,6 +163,12 @@ with demo:
|
|
| 163 |
gr.Markdown('## Input Fragments')
|
| 164 |
gr.Markdown('Upload the file with 3D-coordinates of the input fragments in .pdb, .mol2 or .sdf format:')
|
| 165 |
input_file = gr.File(file_count='single', label='Input Fragments')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 166 |
button = gr.Button('Generate Linker!')
|
| 167 |
gr.Markdown('')
|
| 168 |
gr.Markdown('## Output Files')
|
|
@@ -171,13 +177,18 @@ with demo:
|
|
| 171 |
with gr.Column():
|
| 172 |
visualization = gr.HTML()
|
| 173 |
|
| 174 |
-
|
| 175 |
-
|
| 176 |
inputs=[input_file],
|
| 177 |
outputs=[visualization],
|
| 178 |
-
fn=show_input,
|
| 179 |
-
run_on_click=True,
|
| 180 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 181 |
input_file.change(
|
| 182 |
fn=show_input,
|
| 183 |
inputs=[input_file],
|
|
|
|
| 163 |
gr.Markdown('## Input Fragments')
|
| 164 |
gr.Markdown('Upload the file with 3D-coordinates of the input fragments in .pdb, .mol2 or .sdf format:')
|
| 165 |
input_file = gr.File(file_count='single', label='Input Fragments')
|
| 166 |
+
dataset = gr.Dataset(
|
| 167 |
+
components=[input_file],
|
| 168 |
+
samples=[['examples/example_1.sdf'], ['examples/example_2.sdf']],
|
| 169 |
+
type='values',
|
| 170 |
+
label='Examples',
|
| 171 |
+
)
|
| 172 |
button = gr.Button('Generate Linker!')
|
| 173 |
gr.Markdown('')
|
| 174 |
gr.Markdown('## Output Files')
|
|
|
|
| 177 |
with gr.Column():
|
| 178 |
visualization = gr.HTML()
|
| 179 |
|
| 180 |
+
dataset.click(
|
| 181 |
+
fn=show_input,
|
| 182 |
inputs=[input_file],
|
| 183 |
outputs=[visualization],
|
|
|
|
|
|
|
| 184 |
)
|
| 185 |
+
# examples = gr.Examples(
|
| 186 |
+
# examples=[['examples/example_1.sdf'], ['examples/example_2.sdf']],
|
| 187 |
+
# inputs=[input_file],
|
| 188 |
+
# outputs=[visualization],
|
| 189 |
+
# fn=show_input,
|
| 190 |
+
# run_on_click=True,
|
| 191 |
+
# )
|
| 192 |
input_file.change(
|
| 193 |
fn=show_input,
|
| 194 |
inputs=[input_file],
|