simonduerr commited on
Commit
3a5c939
·
1 Parent(s): 8492c94

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -21,7 +21,7 @@ def update(smiles):
21
  </html>
22
  """
23
  )
24
- return f"""<iframe style="width: 600px; height: 600px" name="result" allow="midi; geolocation; microphone; camera;
25
  display-capture; encrypted-media;" sandbox="allow-modals allow-forms
26
  allow-scripts allow-same-origin allow-popups
27
  allow-top-navigation-by-user-activation allow-downloads" allowfullscreen=""
@@ -34,7 +34,7 @@ with gr.Blocks() as demo:
34
  inp = gr.Textbox(label="SMILES string", placeholder="CCCC")
35
  out = gr.HTML()
36
  btn = gr.Button("Run")
37
- gr.Examples([["CCCCC", "OC(C(=O)O[C@H]1C[N+]2(CCCOC3=CC=CC=C3)CCC1CC2)(C1=CC=CS1)C1=CC=CS1"]], inp, out, update, cache_examples=True)
38
 
39
  btn.click(fn=update, inputs=inp, outputs=out)
40
 
 
21
  </html>
22
  """
23
  )
24
+ return f"""<iframe style="width: 100%; min-height: 600px;margin:0 auto" name="result" allow="midi; geolocation; microphone; camera;
25
  display-capture; encrypted-media;" sandbox="allow-modals allow-forms
26
  allow-scripts allow-same-origin allow-popups
27
  allow-top-navigation-by-user-activation allow-downloads" allowfullscreen=""
 
34
  inp = gr.Textbox(label="SMILES string", placeholder="CCCC")
35
  out = gr.HTML()
36
  btn = gr.Button("Run")
37
+ gr.Examples(["CCCCC", "OC(C(=O)O[C@H]1C[N+]2(CCCOC3=CC=CC=C3)CCC1CC2)(C1=CC=CS1)C1=CC=CS1"], inp, out, update, cache_examples=True)
38
 
39
  btn.click(fn=update, inputs=inp, outputs=out)
40