Spaces:
Sleeping
Sleeping
missing device def
Browse files
app.py
CHANGED
@@ -70,6 +70,8 @@ def visualize(image, mask, box):
|
|
70 |
|
71 |
# Main function for Gradio app
|
72 |
def process_images(file, x_min, y_min, x_max, y_max):
|
|
|
|
|
73 |
# Load and preprocess image
|
74 |
image, H, W = load_image(file)
|
75 |
image_resized = transform.resize(image, (1024, 1024), anti_aliasing=True)
|
|
|
70 |
|
71 |
# Main function for Gradio app
|
72 |
def process_images(file, x_min, y_min, x_max, y_max):
|
73 |
+
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
74 |
+
|
75 |
# Load and preprocess image
|
76 |
image, H, W = load_image(file)
|
77 |
image_resized = transform.resize(image, (1024, 1024), anti_aliasing=True)
|