Update app.py
Browse files
app.py
CHANGED
|
@@ -24,28 +24,9 @@ def load_data():
|
|
| 24 |
G = 32
|
| 25 |
|
| 26 |
data = load_dataset("cmudrc/wave-energy", data_files=["data.zip"], split='train')
|
| 27 |
-
# curvey_curves = [numpy.array(x)/1000000 for x in data['curves']]
|
| 28 |
-
# round_geometry = [numpy.array(x) for x in data['geometry']]
|
| 29 |
-
# round_geometry = numpy.array(data['geometry'])
|
| 30 |
-
curvey_curves = None
|
| 31 |
-
round_geometry = None
|
| 32 |
geometry = numpy.reshape(data['geometry'], (S*N, G*G*G))
|
| 33 |
curves = numpy.reshape(data['curves'], (S*N, D*F))/1000000
|
| 34 |
-
|
| 35 |
-
# geometry = load_dataset("cmudrc/wave-energy", data_files="geometry.zip", split='train').to_pandas().drop(labels="index", axis=1)
|
| 36 |
-
|
| 37 |
-
# Open all the files we downloaded at the beginning and take out hte good bits
|
| 38 |
-
# curves = data.iloc[:, [i for i in range(1, 3*64+1)]]
|
| 39 |
-
# geometry = data.iloc[:, [i for i in range(1 + 3*64, 1 + 3*64 + 32**3)]]
|
| 40 |
-
|
| 41 |
-
# flattened_curves = curves.values / 1000000
|
| 42 |
-
# curvey_curves = [c.reshape([D, F])/1000000 for c in curves.values]
|
| 43 |
-
|
| 44 |
-
# flattened_geometry = geometry.values
|
| 45 |
-
# round_geometry = [g.reshape([G, G, G]) for g in geometry.values]
|
| 46 |
-
|
| 47 |
-
# Return good bits to user
|
| 48 |
-
return curvey_curves, round_geometry, S, N, D, F, G, curves, geometry
|
| 49 |
|
| 50 |
# Disable eager execution because its bad
|
| 51 |
from tensorflow.python.framework.ops import disable_eager_execution
|
|
|
|
| 24 |
G = 32
|
| 25 |
|
| 26 |
data = load_dataset("cmudrc/wave-energy", data_files=["data.zip"], split='train')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
geometry = numpy.reshape(data['geometry'], (S*N, G*G*G))
|
| 28 |
curves = numpy.reshape(data['curves'], (S*N, D*F))/1000000
|
| 29 |
+
return None, None, S, N, D, F, G, curves, geometry
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
# Disable eager execution because its bad
|
| 32 |
from tensorflow.python.framework.ops import disable_eager_execution
|