jovian commited on
Commit
0887430
·
1 Parent(s): db2c45e
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -6,7 +6,7 @@ from sahi import AutoDetectionModel
6
  from PIL import Image
7
  import plotly.graph_objects as go
8
  import torch
9
- #import spaces
10
 
11
  import os
12
  import shutil
@@ -330,7 +330,7 @@ def upload_image(image):
330
  """Process the uploaded image (if needed) and display it."""
331
  return image
332
 
333
- #@spaces.GPU
334
  def apply_detection(image,slice_width_input,slice_height_input,overlap_width_input,overlap_height_input):
335
  """Run object detection on the uploaded image and return the annotated image."""
336
  # Convert image from PIL to NumPy array
 
6
  from PIL import Image
7
  import plotly.graph_objects as go
8
  import torch
9
+ import spaces
10
 
11
  import os
12
  import shutil
 
330
  """Process the uploaded image (if needed) and display it."""
331
  return image
332
 
333
+ @spaces.GPU
334
  def apply_detection(image,slice_width_input,slice_height_input,overlap_width_input,overlap_height_input):
335
  """Run object detection on the uploaded image and return the annotated image."""
336
  # Convert image from PIL to NumPy array