Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -12,6 +12,7 @@ import gradio as gr
|
|
12 |
import warnings
|
13 |
|
14 |
import torch
|
|
|
15 |
|
16 |
os.system("python setup.py build develop --user")
|
17 |
os.system("pip install packaging==21.3")
|
@@ -64,6 +65,7 @@ def image_transform_grounding_for_vis(init_image):
|
|
64 |
|
65 |
model = load_model_hf(config_file, ckpt_repo_id, ckpt_filenmae)
|
66 |
|
|
|
67 |
def run_grounding(input_image, grounding_caption, box_threshold, text_threshold):
|
68 |
init_image = input_image.convert("RGB")
|
69 |
original_size = init_image.size
|
|
|
12 |
import warnings
|
13 |
|
14 |
import torch
|
15 |
+
import spaces
|
16 |
|
17 |
os.system("python setup.py build develop --user")
|
18 |
os.system("pip install packaging==21.3")
|
|
|
65 |
|
66 |
model = load_model_hf(config_file, ckpt_repo_id, ckpt_filenmae)
|
67 |
|
68 |
+
@spaces.GPU
|
69 |
def run_grounding(input_image, grounding_caption, box_threshold, text_threshold):
|
70 |
init_image = input_image.convert("RGB")
|
71 |
original_size = init_image.size
|