Spaces:
Sleeping
Sleeping
igashov
commited on
Commit
•
f1c7e08
1
Parent(s):
0ce499b
buttons
Browse files
app.py
CHANGED
@@ -163,6 +163,15 @@ 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')
|
@@ -182,13 +191,28 @@ with demo:
|
|
182 |
outputs=[visualization, output_files],
|
183 |
)
|
184 |
|
185 |
-
|
186 |
-
|
187 |
-
inputs=[
|
188 |
-
outputs=[
|
189 |
-
|
190 |
-
|
191 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
193 |
|
194 |
demo.launch(server_name=args.ip)
|
|
|
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 |
+
|
167 |
+
with gr.Row():
|
168 |
+
with gr.Column():
|
169 |
+
example1 = gr.Button('Example 1')
|
170 |
+
with gr.Column():
|
171 |
+
example2 = gr.Button('Example 2')
|
172 |
+
with gr.Column():
|
173 |
+
example3 = gr.Button('Example 3')
|
174 |
+
|
175 |
button = gr.Button('Generate Linker!')
|
176 |
gr.Markdown('')
|
177 |
gr.Markdown('## Output Files')
|
|
|
191 |
outputs=[visualization, output_files],
|
192 |
)
|
193 |
|
194 |
+
example1.click(
|
195 |
+
fn=lambda: 'examples/example_1.sdf',
|
196 |
+
inputs=[],
|
197 |
+
outputs=[input_file],
|
198 |
+
)
|
199 |
+
example2.click(
|
200 |
+
fn=lambda: 'examples/example_2.sdf',
|
201 |
+
inputs=[],
|
202 |
+
outputs=[input_file],
|
203 |
+
)
|
204 |
+
example3.click(
|
205 |
+
fn=lambda: 'examples/example_1.sdf',
|
206 |
+
inputs=[],
|
207 |
+
outputs=[input_file],
|
208 |
)
|
209 |
+
# examples = gr.Examples(
|
210 |
+
# examples=[['examples/example_1.sdf'], ['examples/example_2.sdf']],
|
211 |
+
# inputs=[input_file],
|
212 |
+
# outputs=[visualization],
|
213 |
+
# fn=show_input,
|
214 |
+
# run_on_click=True,
|
215 |
+
# cache_examples=False,
|
216 |
+
# )
|
217 |
|
218 |
demo.launch(server_name=args.ip)
|