mrdbourke commited on
Commit
60e70c4
·
verified ·
1 Parent(s): d6f247a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -4,6 +4,8 @@ import open_clip
4
  import gradio as gr
5
  from mobileclip.modules.common.mobileone import reparameterize_model
6
 
 
 
7
  ################################################################################
8
  # Model Configuration
9
  ################################################################################
@@ -51,6 +53,7 @@ def load_model(model_name):
51
  ################################################################################
52
  # Inference
53
  ################################################################################
 
54
  def classify_image(image, candidate_labels, model_name):
55
  """
56
  Classify image using selected MobileCLIP2 model
 
4
  import gradio as gr
5
  from mobileclip.modules.common.mobileone import reparameterize_model
6
 
7
+ import spaces
8
+
9
  ################################################################################
10
  # Model Configuration
11
  ################################################################################
 
53
  ################################################################################
54
  # Inference
55
  ################################################################################
56
+ @spaces.GPU(duration=120)
57
  def classify_image(image, candidate_labels, model_name):
58
  """
59
  Classify image using selected MobileCLIP2 model