igashov commited on
Commit
0ce499b
1 Parent(s): 4ff7ca7
Files changed (1) hide show
  1. app.py +9 -18
app.py CHANGED
@@ -163,12 +163,6 @@ 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
- 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,18 +171,6 @@ with demo:
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],
@@ -200,4 +182,13 @@ with demo:
200
  outputs=[visualization, output_files],
201
  )
202
 
 
 
 
 
 
 
 
 
 
203
  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
  button = gr.Button('Generate Linker!')
167
  gr.Markdown('')
168
  gr.Markdown('## Output Files')
 
171
  with gr.Column():
172
  visualization = gr.HTML()
173
 
 
 
 
 
 
 
 
 
 
 
 
 
174
  input_file.change(
175
  fn=show_input,
176
  inputs=[input_file],
 
182
  outputs=[visualization, output_files],
183
  )
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
+ cache_examples=False,
192
+ )
193
+
194
  demo.launch(server_name=args.ip)