gjbooth2 commited on
Commit
7f5e1a1
·
verified ·
1 Parent(s): dcdcd79

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -6,6 +6,7 @@ import torch
6
  import torch.nn.functional as F
7
  from matplotlib import pyplot as plt
8
  from PIL import Image
 
9
 
10
 
11
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
@@ -23,7 +24,7 @@ def image_gen(click,rows = 4,cols = 4):
23
  return grid
24
  #return 'button clicked'
25
 
26
-
27
  def image_gen_modified(rows=4,cols=4):
28
  pic_hold = []
29
  model_output = pipeline(batch_size=16).images
 
6
  import torch.nn.functional as F
7
  from matplotlib import pyplot as plt
8
  from PIL import Image
9
+ import spaces
10
 
11
 
12
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
 
24
  return grid
25
  #return 'button clicked'
26
 
27
+ @spaces.GPU
28
  def image_gen_modified(rows=4,cols=4):
29
  pic_hold = []
30
  model_output = pipeline(batch_size=16).images