ccm commited on
Commit
a99a8d0
1 Parent(s): 412e24c

This one is much better

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -10,7 +10,7 @@ import pandas as pd
10
  warnings.filterwarnings('ignore')
11
  disable_eager_execution()
12
 
13
- load_data = np.load('train_test_split_data.npz') # Data saved by the VAE
14
 
15
  # Convert Data to Tuples and Assign to respective variables
16
  box_matrix_train, box_density_train, additional_pixels_train, box_shape_train = tuple(load_data['box_matrix_train']), tuple(load_data['box_density_train']), tuple(load_data['additional_pixels_train']), tuple(load_data['box_shape_train'])
@@ -245,18 +245,18 @@ thickness_options = [str(int(x)) for x in numpy.linspace(0, 10, 11)]
245
  interpolation_options = [str(int(x)) for x in [3, 5, 10]]
246
 
247
  def interpolate(t1, t2, d1, d2, th1, th2, steps):
248
- decoder_model_boxes = tensorflow.keras.models.load_model('decoder_model_boxes', compile=False)
249
  # # compile=False ignores a warning from tensorflow, can be removed to see warning
250
 
251
  # # import the encoder model architecture
252
- json_file_loaded = open('model.json', 'r')
253
  loaded_model_json = json_file_loaded.read()
254
 
255
  # load model using the saved json file
256
  encoder_model_boxes = tensorflow.keras.models.model_from_json(loaded_model_json)
257
 
258
  # load weights into newly loaded_model
259
- encoder_model_boxes.load_weights('model_tf')
260
 
261
  num_internal = int(steps)
262
  number_1 = globals()[t1](int(th1), float(d1), 28)
 
10
  warnings.filterwarnings('ignore')
11
  disable_eager_execution()
12
 
13
+ load_data = np.load('data/train_test_split_data.npz') # Data saved by the VAE
14
 
15
  # Convert Data to Tuples and Assign to respective variables
16
  box_matrix_train, box_density_train, additional_pixels_train, box_shape_train = tuple(load_data['box_matrix_train']), tuple(load_data['box_density_train']), tuple(load_data['additional_pixels_train']), tuple(load_data['box_shape_train'])
 
245
  interpolation_options = [str(int(x)) for x in [3, 5, 10]]
246
 
247
  def interpolate(t1, t2, d1, d2, th1, th2, steps):
248
+ decoder_model_boxes = tensorflow.keras.models.load_model('data/decoder_model_boxes', compile=False)
249
  # # compile=False ignores a warning from tensorflow, can be removed to see warning
250
 
251
  # # import the encoder model architecture
252
+ json_file_loaded = open('data/model.json', 'r')
253
  loaded_model_json = json_file_loaded.read()
254
 
255
  # load model using the saved json file
256
  encoder_model_boxes = tensorflow.keras.models.model_from_json(loaded_model_json)
257
 
258
  # load weights into newly loaded_model
259
+ encoder_model_boxes.load_weights('data/model_tf')
260
 
261
  num_internal = int(steps)
262
  number_1 = globals()[t1](int(th1), float(d1), 28)