Oopstom commited on
Commit
671cbc6
1 Parent(s): 12cc0d4

update clear button

Browse files
Files changed (3) hide show
  1. app.py +2 -2
  2. tmp_data/src.txt +1 -1
  3. tmp_data/tgt.txt +10 -10
app.py CHANGED
@@ -153,7 +153,7 @@ def secondary_interface(smiles, atom1_idx, atom2_idx, operation, progress=gr.Pro
153
 
154
  def clear_interface():
155
  return (
156
- # gr.update(value=None), # smiles_input
157
  gr.update(value=None), # img_output
158
  gr.update(value=None), # smiles_output
159
  gr.update(visible=False), # secondary_inputs
@@ -214,7 +214,7 @@ with gr.Blocks() as interface:
214
  clear_button.click(
215
  clear_interface,
216
  inputs=[],
217
- outputs=[img_output, smiles_output, secondary_inputs, secondary_inputs, error_output, prompt_output] + result_row
218
  )
219
 
220
  gr.Examples(examples=examples, inputs=[smiles_input, atom1_idx, atom2_idx, operation])
 
153
 
154
  def clear_interface():
155
  return (
156
+ gr.update(value=None), # smiles_input
157
  gr.update(value=None), # img_output
158
  gr.update(value=None), # smiles_output
159
  gr.update(visible=False), # secondary_inputs
 
214
  clear_button.click(
215
  clear_interface,
216
  inputs=[],
217
+ outputs=[smiles_input, img_output, smiles_output, secondary_inputs, secondary_inputs, error_output, prompt_output] + result_row
218
  )
219
 
220
  gr.Examples(examples=examples, inputs=[smiles_input, atom1_idx, atom2_idx, operation])
tmp_data/src.txt CHANGED
@@ -1 +1 @@
1
- N # C C 1 = C C = C ( C ( C ( ; O ) C C 2 = C C = C ( F ) C = C 2 ) N 2 C = N C = N 2 ) C = C 1
 
1
+ N # C C 1 = C C = C ( C ( C ( O ) C C 2 = C C = C ( F ) C = C 2 ) ! N 2 C = N C = N 2 ) C = C 1
tmp_data/tgt.txt CHANGED
@@ -1,10 +1,10 @@
1
- N # C C 1 = C C = C ( C ( C ( ; O ) C C 2 = C C = C ( F ) C = C 2 ) N 2 C = N C = N 2 ) C = C 1
2
- N # C C 1 = C C = C ( C ( C ( ; O ) ! C C 2 = C C = C ( F ) C = C 2 ) N 2 C = N C = N 2 ) C = C 1 < > < [ M g + : 1 ] >
3
- N # C C 1 = C C = C ( [ r C H ] ( C ( ; O ) C C 2 = C C = C ( F ) C = C 2 ) N 2 C = N C = N 2 ) C = C 1
4
- N # C C 1 = C C = C ( C ( C ( ; O ) ! C C 2 = C C = C ( F ) C = C 2 ) N 2 C = N C = N 2 ) C = C 1 < > < [ B r : 1 ] >
5
- N # C C 1 = C C = C ( C ( ! C ( ; O ) C C 2 = C C = C ( F ) C = C 2 ) N 2 C = N C = N 2 ) C = C 1 < > < [ M g + : 1 ] >
6
- N # C C 1 = C C = C ( [ s C H ] ( C ( ; O ) C C 2 = C C = C ( F ) C = C 2 ) N 2 C = N C = N 2 ) C = C 1
7
- N # C C 1 = C C = C ( C ( C ( ; O ) ( C C 2 = C C = C ( F ) C = C 2 ) N 2 C = N C = N 2 ) C = C 1
8
- N # C C 1 = C C = C ( C ( C ( ; O ) ! C C 2 = C C = C ( F ) C = C 2 ) N 2 C = N C = N 2 ) C = C 1 < > < [ C l : 1 ] >
9
- N # C C 1 = C C = C ( C ( [ ~ C H 2 ] ; O ) C C 2 = C C = C ( F ) C = C 2 ) N 2 C = N C = N 2 ) C = C 1 < C [ O : 1 ] >
10
- N # C C 1 = C C = C ( C ( C ( ; O ) ; C C 2 = C C = C ( F ) C = C 2 ) N 2 C = N C = N 2 ) C = C 1
 
1
+ N # C C 1 = C C = C ( C ( C ( O ) C C 2 = C C = C ( F ) C = C 2 ) ! N 2 C = N C = N 2 ) C = C 1 < [ B r : 1 ] > < >
2
+ N # C C 1 = C C = C ( C ( C ( O ) C C 2 = C C = C ( F ) C = C 2 ) ! N 2 C = N C = N 2 ) C = C 1 < [ C l : 1 ] > < >
3
+ N # C C 1 = C C = C ( C ( C ( O ) C C 2 = C C = C ( F ) C = C 2 ) ! N 2 C = N C = N 2 ) C = C 1 < [ F : 1 ] > < >
4
+ N # C C 1 = C C = C ( [ r C H ] ( C ( O ) C C 2 = C C = C ( F ) C = C 2 ) ! N 2 C = N C = N 2 ) C = C 1 < [ B r : 1 ] > < >
5
+ N # C C 1 = C C = C ( [ r C H ] ( C ( O ) C C 2 = C C = C ( F ) C = C 2 ) ! N 2 C = N C = N 2 ) C = C 1 < [ C l : 1 ] > < >
6
+ N # C C 1 = C C = C ( C ( C ( O ) C C 2 = C C = C ( F ) C = C 2 ) ! N 2 C = N C = N 2 ) C = C 1 < [ O H : 1 ] > < >
7
+ N # C C 1 = C C = C ( C ( C ( O ) C C 2 = C C = C ( F ) C = C 2 ) ! N 2 C = N C = N 2 ) C = C 1 < [ I : 1 ] > < >
8
+ N # C C 1 = C C = C ( B ( C ( O ) C C 2 = C C = C ( F ) C = C 2 ) ! N 2 C = N C = N 2 ) C = C 1 < [ B r : 1 ] > < >
9
+ N # C C 1 = C C = C ( [ r C H ] ( C ( O ) C C 2 = C C = C ( F ) C = C 2 ) ! N 2 C = N C = N 2 ) C = C 1 < [ O H : 1 ] > < >
10
+ N # C C 1 = C C = C ( C ( C ( O ) C C 2 = C C = C ( F ) C = C 2 ) ! N 2 C = N C = N 2 ) C = C 1 < S ( C ) ( = O ) ( = O