ccm commited on
Commit
3591396
1 Parent(s): dca9d9c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -25,9 +25,9 @@ VERBOSE = 1
25
  # This function loads a fuckton of data
26
  def load_data():
27
  # Open all the files we downloaded at the beginning and take out hte good bits
28
- curves = numpy.load('/content/data_curves.npz')['curves']
29
- geometry = numpy.load('/content/data_geometry.npz')['geometry']
30
- constants = numpy.load('/content/constants.npz')
31
  S = constants['S']
32
  N = constants['N']
33
  D = constants['D']
@@ -158,11 +158,11 @@ class Network(object):
158
  return table
159
 
160
  def simple_analysis(index):
161
- net = Network("/content/16forward_structure.json", "/content/16forward_weights.h5")
162
  return net.analysis(index)
163
 
164
  def simple_synthesis(index):
165
- net = Network("/content/16inverse_structure.json", "/content/16inverse_weights.h5")
166
  pred, true = net.synthesis(index)
167
  return plotly_fig(pred), plotly_fig(true)
168
 
@@ -170,11 +170,11 @@ import plotly.graph_objects as go
170
  import numpy as np
171
 
172
  def performance(index):
173
- net = Network("/content/16forward_structure.json", "/content/16forward_weights.h5")
174
  return net.get_performance(index)
175
 
176
  def geometry(index):
177
- net = Network("/content/16forward_structure.json", "/content/16forward_weights.h5")
178
  values = net.get_geometry(index)
179
  return plotly_fig(values)
180
 
 
25
  # This function loads a fuckton of data
26
  def load_data():
27
  # Open all the files we downloaded at the beginning and take out hte good bits
28
+ curves = numpy.load('data_curves.npz')['curves']
29
+ geometry = numpy.load('data_geometry.npz')['geometry']
30
+ constants = numpy.load('constants.npz')
31
  S = constants['S']
32
  N = constants['N']
33
  D = constants['D']
 
158
  return table
159
 
160
  def simple_analysis(index):
161
+ net = Network("16forward_structure.json", "16forward_weights.h5")
162
  return net.analysis(index)
163
 
164
  def simple_synthesis(index):
165
+ net = Network("16inverse_structure.json", "16inverse_weights.h5")
166
  pred, true = net.synthesis(index)
167
  return plotly_fig(pred), plotly_fig(true)
168
 
 
170
  import numpy as np
171
 
172
  def performance(index):
173
+ net = Network("16forward_structure.json", "16forward_weights.h5")
174
  return net.get_performance(index)
175
 
176
  def geometry(index):
177
+ net = Network("16forward_structure.json", "16forward_weights.h5")
178
  values = net.get_geometry(index)
179
  return plotly_fig(values)
180