Spaces:
Running
on
Zero
Running
on
Zero
chancetophugging
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
import gradio as gr
|
2 |
import torch
|
3 |
from PIL import Image, ImageDraw, ImageFont
|
@@ -22,7 +23,7 @@ def init_pipeline():
|
|
22 |
adapter_name="subject",
|
23 |
)
|
24 |
|
25 |
-
|
26 |
def process_image_and_text(image, text):
|
27 |
# center crop image
|
28 |
w, h, min_size = image.size[0], image.size[1], min(image.size)
|
|
|
1 |
+
import spaces
|
2 |
import gradio as gr
|
3 |
import torch
|
4 |
from PIL import Image, ImageDraw, ImageFont
|
|
|
23 |
adapter_name="subject",
|
24 |
)
|
25 |
|
26 |
+
@spaces.GPU
|
27 |
def process_image_and_text(image, text):
|
28 |
# center crop image
|
29 |
w, h, min_size = image.size[0], image.size[1], min(image.size)
|