Spaces:
Running
on
Zero
Running
on
Zero
Update demo/gradio_demo.py
Browse files- demo/gradio_demo.py +2 -1
demo/gradio_demo.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
import gradio as gr
|
|
|
|
| 2 |
from PIL import Image, ImageDraw, ImageFont
|
| 3 |
import re
|
| 4 |
import numpy as np
|
|
@@ -177,7 +178,7 @@ def extract_bbox_and_original_image(edited_image):
|
|
| 177 |
print(f"Unknown input type: {type(edited_image)}")
|
| 178 |
return None, []
|
| 179 |
|
| 180 |
-
|
| 181 |
def process(image, example_image, prompt, threshold):
|
| 182 |
image, bbox_list = extract_bbox_and_original_image(image)
|
| 183 |
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
import spaces
|
| 3 |
from PIL import Image, ImageDraw, ImageFont
|
| 4 |
import re
|
| 5 |
import numpy as np
|
|
|
|
| 178 |
print(f"Unknown input type: {type(edited_image)}")
|
| 179 |
return None, []
|
| 180 |
|
| 181 |
+
@spaces.GPU
|
| 182 |
def process(image, example_image, prompt, threshold):
|
| 183 |
image, bbox_list = extract_bbox_and_original_image(image)
|
| 184 |
|