Hbvsa commited on
Commit
e774817
1 Parent(s): 11ea2e0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -3,7 +3,7 @@ import sys
3
  from os.path import abspath, dirname,join
4
  import spaces
5
 
6
- @spaces.GPU()
7
  def run_commands():
8
  commands = [
9
  "git clone https://github.com/IDEA-Research/GroundingDINO.git",
@@ -22,7 +22,7 @@ def run_commands():
22
  except subprocess.CalledProcessError as e:
23
  print(f"Command '{command}' failed with error: {e.stderr.decode()}")
24
 
25
- run_commands()
26
  from typing import List
27
  from Utils import get_video_properties
28
  import cv2
@@ -98,6 +98,7 @@ class ImageClassifier:
98
 
99
  @spaces.GPU()
100
  def pipeline_to_setup_with_gpu():
 
101
  sys.path.append(join(dirname(abspath(__file__)),'GroundingDINO'))
102
  from GroundingDINO.groundingdino.util.inference import load_model, predict
103
  import GroundingDINO.groundingdino.datasets.transforms as T
 
3
  from os.path import abspath, dirname,join
4
  import spaces
5
 
6
+
7
  def run_commands():
8
  commands = [
9
  "git clone https://github.com/IDEA-Research/GroundingDINO.git",
 
22
  except subprocess.CalledProcessError as e:
23
  print(f"Command '{command}' failed with error: {e.stderr.decode()}")
24
 
25
+
26
  from typing import List
27
  from Utils import get_video_properties
28
  import cv2
 
98
 
99
  @spaces.GPU()
100
  def pipeline_to_setup_with_gpu():
101
+ run_commands()
102
  sys.path.append(join(dirname(abspath(__file__)),'GroundingDINO'))
103
  from GroundingDINO.groundingdino.util.inference import load_model, predict
104
  import GroundingDINO.groundingdino.datasets.transforms as T