Update utils/gradio_utils.py
Browse files- utils/gradio_utils.py +2 -2
utils/gradio_utils.py
CHANGED
@@ -30,7 +30,7 @@ transform = transforms.ToTensor()
|
|
30 |
|
31 |
def get_examples():
|
32 |
example_images = [f'{c}.jpg' for c in classes]
|
33 |
-
example_top = [random.randint(
|
34 |
example_transparency = [random.choice([0.6, 0.7, 0.8]) for r in range(10)]
|
35 |
examples = [[example_images[i], example_top[i], example_transparency[i]] for i in range(len(example_images))]
|
36 |
return(examples)
|
@@ -61,4 +61,4 @@ def image_to_array(input_img, model, layer_val, transparency=0.6):
|
|
61 |
image = Image.open(buffer)
|
62 |
ar = np.asarray(image)
|
63 |
|
64 |
-
return(ar)
|
|
|
30 |
|
31 |
def get_examples():
|
32 |
example_images = [f'{c}.jpg' for c in classes]
|
33 |
+
example_top = [random.randint(2, 9) for r in range(10)]
|
34 |
example_transparency = [random.choice([0.6, 0.7, 0.8]) for r in range(10)]
|
35 |
examples = [[example_images[i], example_top[i], example_transparency[i]] for i in range(len(example_images))]
|
36 |
return(examples)
|
|
|
61 |
image = Image.open(buffer)
|
62 |
ar = np.asarray(image)
|
63 |
|
64 |
+
return(ar)
|