Update app.py
Browse files
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 =
|
56 |
-
self.new_curves =
|
57 |
-
self.geometry =
|
58 |
-
self.new_geometry =
|
59 |
-
self.S =
|
60 |
-
self.N =
|
61 |
-
self.D =
|
62 |
-
self.F =
|
63 |
-
self.G =
|
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 |
|