Spaces:
Runtime error
Runtime error
debugging index 0 is out of bounds for axis 0 with size 0 error
Browse files- app.py +3 -0
- bayes/models.py +1 -1
app.py
CHANGED
@@ -30,11 +30,14 @@ BLENHEIM_SPANIEL_CLASS = 156
|
|
30 |
def get_image_data():
|
31 |
"""Gets the image data and model."""
|
32 |
puppy_image = get_dataset_by_name(IMAGE_NAME, get_label=False)
|
|
|
33 |
model_and_data = process_imagenet_get_model(puppy_image)
|
|
|
34 |
return puppy_image, model_and_data
|
35 |
|
36 |
|
37 |
def segmentation_generation(image_name, c_width, n_top, n_gif_imgs):
|
|
|
38 |
cred_width = c_width
|
39 |
n_top_segs = n_top
|
40 |
n_gif_images = n_gif_imgs
|
|
|
30 |
def get_image_data():
|
31 |
"""Gets the image data and model."""
|
32 |
puppy_image = get_dataset_by_name(IMAGE_NAME, get_label=False)
|
33 |
+
print("IMAGE RETURNED FROM GETTING DATASET:\n", model_and_data)
|
34 |
model_and_data = process_imagenet_get_model(puppy_image)
|
35 |
+
print("MODEL RETURNED FROM PROCESSING IMAGE:\n", model_and_data)
|
36 |
return puppy_image, model_and_data
|
37 |
|
38 |
|
39 |
def segmentation_generation(image_name, c_width, n_top, n_gif_imgs):
|
40 |
+
print("GRADIO INPUTS:", image_name, c_width, n_top, n_gif_images)
|
41 |
cred_width = c_width
|
42 |
n_top_segs = n_top
|
43 |
n_gif_images = n_gif_imgs
|
bayes/models.py
CHANGED
@@ -39,7 +39,7 @@ def get_xtrain(segs):
|
|
39 |
|
40 |
def process_imagenet_get_model(data):
|
41 |
"""Gets wrapped imagenet model."""
|
42 |
-
|
43 |
# Get the vgg16 model, used in the experiments
|
44 |
model = models.vgg16(pretrained=True)
|
45 |
model.eval()
|
|
|
39 |
|
40 |
def process_imagenet_get_model(data):
|
41 |
"""Gets wrapped imagenet model."""
|
42 |
+
print("DATA RECEIVED FROM APP:\n", data)
|
43 |
# Get the vgg16 model, used in the experiments
|
44 |
model = models.vgg16(pretrained=True)
|
45 |
model.eval()
|