chancetophugging commited on
Commit
6e3bff7
·
verified ·
1 Parent(s): 9ce9f52

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
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)