ccm commited on
Commit
3ab1145
1 Parent(s): aa69b47

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -15
app.py CHANGED
@@ -48,31 +48,27 @@ def load_data():
48
  import gradio
49
  import pandas
50
 
 
 
51
  class Network(object):
52
 
53
  def __init__(self, structure, weights):
54
  # Instantiate variables
55
- self.curves = 0
56
- self.new_curves = 0
57
- self.geometry = 0
58
- self.new_geometry = 0
59
- self.S = 0
60
- self.N = 0
61
- self.D = 0
62
- self.F = 0
63
- self.G = 0
64
 
65
  # Load network
66
  with open(structure, 'r') as file:
67
  self.network = keras.models.model_from_json(file.read())
68
  self.network.load_weights(weights)
69
 
70
- # Load data
71
- self._load_data()
72
-
73
- def _load_data(self):
74
- self.curves, self.geometry, self.S, self.N, self.D, self.F, self.G, self.new_curves, self.new_geometry = load_data()
75
-
76
  def analysis(self, idx=None):
77
  print(idx)
78
 
 
48
  import gradio
49
  import pandas
50
 
51
+ curves, geometry, S, N, D, F, G, new_curves, new_geometry = load_data()
52
+
53
  class Network(object):
54
 
55
  def __init__(self, structure, weights):
56
  # Instantiate variables
57
+ self.curves = curves
58
+ self.new_curves = new_curves
59
+ self.geometry = geometry
60
+ self.new_geometry = new_geometry
61
+ self.S = S
62
+ self.N = N
63
+ self.D = D
64
+ self.F = F
65
+ self.G = G
66
 
67
  # Load network
68
  with open(structure, 'r') as file:
69
  self.network = keras.models.model_from_json(file.read())
70
  self.network.load_weights(weights)
71
 
 
 
 
 
 
 
72
  def analysis(self, idx=None):
73
  print(idx)
74