yeq6x commited on
Commit
fab2b8a
·
1 Parent(s): 54507dc

load_model

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -9,7 +9,7 @@ import torch
9
  from collections import Counter
10
  import random
11
 
12
- # import spaces
13
 
14
  pipe = None
15
 
@@ -136,7 +136,7 @@ def outpaint_image(image):
136
 
137
  return image
138
 
139
- # @spaces.GPU
140
  def predict_image(cond_image, prompt, negative_prompt):
141
  generator = torch.Generator()
142
  generator.manual_seed(random.randint(0, 2147483647))
@@ -160,7 +160,7 @@ def predict_image(cond_image, prompt, negative_prompt):
160
 
161
  return image
162
 
163
- # load_model()
164
 
165
  # Gradioアプリケーション
166
  with gr.Blocks() as demo:
 
9
  from collections import Counter
10
  import random
11
 
12
+ import spaces
13
 
14
  pipe = None
15
 
 
136
 
137
  return image
138
 
139
+ @spaces.GPU
140
  def predict_image(cond_image, prompt, negative_prompt):
141
  generator = torch.Generator()
142
  generator.manual_seed(random.randint(0, 2147483647))
 
160
 
161
  return image
162
 
163
+ load_model()
164
 
165
  # Gradioアプリケーション
166
  with gr.Blocks() as demo: