jovian commited on
Commit
b856007
·
1 Parent(s): b1600c9
Files changed (2) hide show
  1. app.py +2 -0
  2. model/company_model.pt +3 -0
app.py CHANGED
@@ -6,6 +6,7 @@ from sahi import AutoDetectionModel
6
  from PIL import Image
7
  import plotly.graph_objects as go
8
  import torch
 
9
 
10
  device = "cuda:0" if torch.cuda.is_available() else "cpu"
11
 
@@ -208,6 +209,7 @@ def upload_image(image):
208
  """Process the uploaded image (if needed) and display it."""
209
  return image
210
 
 
211
  def apply_detection(image):
212
  """Run object detection on the uploaded image and return the annotated image."""
213
  # 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
  device = "cuda:0" if torch.cuda.is_available() else "cpu"
12
 
 
209
  """Process the uploaded image (if needed) and display it."""
210
  return image
211
 
212
+ @spaces.GPU
213
  def apply_detection(image):
214
  """Run object detection on the uploaded image and return the annotated image."""
215
  # Convert image from PIL to NumPy array
model/company_model.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6e2510291d55581f170275335dccbab9c2b91d85db4602bc399e15a0f7a24662
3
+ size 5461843