Spaces:
Running
on
Zero
Running
on
Zero
add Zero GPU capabilities
Browse files- gradio_ui.py +2 -0
gradio_ui.py
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
import PIL
|
2 |
import torch
|
3 |
import subprocess
|
@@ -177,6 +178,7 @@ def blip_image_captioning(image: PIL.Image.Image,
|
|
177 |
# return caption
|
178 |
|
179 |
# Define a function to process the image with the loaded model
|
|
|
180 |
def process_image(image_path: str,
|
181 |
controlnet_model_name_or_path: str,
|
182 |
caption_model_name: str,
|
|
|
1 |
+
import spaces
|
2 |
import PIL
|
3 |
import torch
|
4 |
import subprocess
|
|
|
178 |
# return caption
|
179 |
|
180 |
# Define a function to process the image with the loaded model
|
181 |
+
@spaces.GPU
|
182 |
def process_image(image_path: str,
|
183 |
controlnet_model_name_or_path: str,
|
184 |
caption_model_name: str,
|