simonduerr commited on
Commit
4d5fa7b
1 Parent(s): 573ab4f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -105,13 +105,14 @@ def update(inp, file, public_link):
105
  print("public link", public_link)
106
  return molecule(pdb_path, public_link)
107
 
108
- public_link = ""
109
  demo = gr.Blocks()
110
 
111
  with demo:
112
  gr.Markdown("# PDB viewer using Mol*")
113
  gr.Markdown("""If using please cite
114
  > David Sehnal, Sebastian Bittrich, Mandar Deshpande, Radka Svobodová, Karel Berka, Václav Bazgier, Sameer Velankar, Stephen K Burley, Jaroslav Koča, Alexander S Rose: Mol* Viewer: modern web app for 3D visualization and analysis of large biomolecular structures, Nucleic Acids Research, 2021; 10.1093/nar/gkab31.""")
 
115
  with gr.Row():
116
  with gr.Box():
117
  inp = gr.Textbox(
@@ -122,4 +123,6 @@ with demo:
122
  btn = gr.Button("View structure")
123
  mol = gr.HTML()
124
  btn.click(fn=update, inputs=[inp, file, public_link], outputs=mol)
125
- _, _, public_link = demo.launch()
 
 
 
105
  print("public link", public_link)
106
  return molecule(pdb_path, public_link)
107
 
108
+
109
  demo = gr.Blocks()
110
 
111
  with demo:
112
  gr.Markdown("# PDB viewer using Mol*")
113
  gr.Markdown("""If using please cite
114
  > David Sehnal, Sebastian Bittrich, Mandar Deshpande, Radka Svobodová, Karel Berka, Václav Bazgier, Sameer Velankar, Stephen K Burley, Jaroslav Koča, Alexander S Rose: Mol* Viewer: modern web app for 3D visualization and analysis of large biomolecular structures, Nucleic Acids Research, 2021; 10.1093/nar/gkab31.""")
115
+ public_link = gr.Variable()
116
  with gr.Row():
117
  with gr.Box():
118
  inp = gr.Textbox(
 
123
  btn = gr.Button("View structure")
124
  mol = gr.HTML()
125
  btn.click(fn=update, inputs=[inp, file, public_link], outputs=mol)
126
+ _, _, pl = demo.launch()
127
+
128
+ public_link = pl