A19grey commited on
Commit
5dc8161
·
1 Parent(s): 1ec711e

added explicit server name and SSR=False callouts in demo.launch and removed gradio/gradio_client from reqs file

Browse files
Files changed (2) hide show
  1. app.py +7 -2
  2. requirements.txt +1 -1
app.py CHANGED
@@ -48,6 +48,7 @@ References
48
  - Project Structure: See quantum-demo-blueprint.md
49
  """
50
 
 
51
  import subprocess
52
  import sys
53
  import json
@@ -136,7 +137,9 @@ import numpy as np
136
  from quantum_utils import run_vqe_simulation
137
  from visualization import plot_convergence, create_molecule_viewer, format_molecule_params
138
  from gradio_molgallery3d import MolGallery3D
139
- import spaces
 
 
140
 
141
  # Add immediate logging
142
  print("Imported all modules successfully", file=sys.stderr, flush=True)
@@ -500,5 +503,7 @@ def create_interface():
500
  return demo
501
 
502
  if __name__ == "__main__":
 
503
  demo = create_interface()
504
- demo.launch(share=False)
 
 
48
  - Project Structure: See quantum-demo-blueprint.md
49
  """
50
 
51
+ import spaces
52
  import subprocess
53
  import sys
54
  import json
 
137
  from quantum_utils import run_vqe_simulation
138
  from visualization import plot_convergence, create_molecule_viewer, format_molecule_params
139
  from gradio_molgallery3d import MolGallery3D
140
+
141
+ from gradio_client import Client
142
+ client = Client("your-space", headers={"X-IP-Token": request.headers['x-ip-token']})
143
 
144
  # Add immediate logging
145
  print("Imported all modules successfully", file=sys.stderr, flush=True)
 
503
  return demo
504
 
505
  if __name__ == "__main__":
506
+ print("Starting VQE Demo Application")
507
  demo = create_interface()
508
+ print("Gonna demo and launch this thing")
509
+ demo.launch(server_name="0.0.0.0", server_port=7860, ssr=False)
requirements.txt CHANGED
@@ -7,7 +7,7 @@ scipy==1.10.1
7
 
8
  # Gradio and visualization components
9
  # gradio==4.44.1
10
- gradio_client
11
  gradio_molgallery3d>=0.0.4
12
 
13
  # Plotting and visualization libraries
 
7
 
8
  # Gradio and visualization components
9
  # gradio==4.44.1
10
+ # gradio_client
11
  gradio_molgallery3d>=0.0.4
12
 
13
  # Plotting and visualization libraries