Spaces:
Runtime error
Runtime error
debugging index 0 is out of bounds for axis 0 with size 0 error
Browse filesFiles changed (2)
- app.py+3
- bayes/models.py+1-1
29 unmodified lines303132333435363738394029 unmodified linesdef get_image_data():"""Gets the image data and model."""puppy_image = get_dataset_by_name(IMAGE_NAME, get_label=False)model_and_data = process_imagenet_get_model(puppy_image)return puppy_image, model_and_datadef segmentation_generation(image_name, c_width, n_top, n_gif_imgs):cred_width = c_widthn_top_segs = n_topn_gif_images = n_gif_imgs29 unmodified lines303132333435363738394041424329 unmodified linesdef get_image_data():"""Gets the image data and model."""puppy_image = get_dataset_by_name(IMAGE_NAME, get_label=False)print("IMAGE RETURNED FROM GETTING DATASET:\n", model_and_data)model_and_data = process_imagenet_get_model(puppy_image)print("MODEL RETURNED FROM PROCESSING IMAGE:\n", model_and_data)return puppy_image, model_and_datadef segmentation_generation(image_name, c_width, n_top, n_gif_imgs):print("GRADIO INPUTS:", image_name, c_width, n_top, n_gif_images)cred_width = c_widthn_top_segs = n_topn_gif_images = n_gif_imgs
38 unmodified lines3940414243444538 unmodified linesdef process_imagenet_get_model(data):"""Gets wrapped imagenet model."""# Get the vgg16 model, used in the experimentsmodel = models.vgg16(pretrained=True)model.eval()38 unmodified lines3940414243444538 unmodified linesdef process_imagenet_get_model(data):"""Gets wrapped imagenet model."""print("DATA RECEIVED FROM APP:\n", data)# Get the vgg16 model, used in the experimentsmodel = models.vgg16(pretrained=True)model.eval()
app.py+3
bayes/models.py+1-1