wangqinghehe commited on
Commit
0b97eed
1 Parent(s): 3ab16a9

0516_zerogpu

Browse files
Files changed (2) hide show
  1. app.py +2 -1
  2. requirements.txt +2 -1
app.py CHANGED
@@ -173,7 +173,7 @@ def handle_prompts(prompts_array):
173
  return prompts
174
 
175
 
176
-
177
  def generate_image(experiment_name, label, prompts_array, chose_emb):
178
  prompts = handle_prompts(prompts_array)
179
 
@@ -275,6 +275,7 @@ def get_example():
275
  ]
276
  return case
277
 
 
278
  def run_for_examples(example_emb, gender_GAN, choice, prompts_array):
279
  prompts = handle_prompts(prompts_array)
280
  label, experiment_name = response(choice, gender_GAN)
 
173
  return prompts
174
 
175
 
176
+ @spaces.GPU
177
  def generate_image(experiment_name, label, prompts_array, chose_emb):
178
  prompts = handle_prompts(prompts_array)
179
 
 
275
  ]
276
  return case
277
 
278
+ @spaces.GPU
279
  def run_for_examples(example_emb, gender_GAN, choice, prompts_array):
280
  prompts = handle_prompts(prompts_array)
281
  label, experiment_name = response(choice, gender_GAN)
requirements.txt CHANGED
@@ -12,4 +12,5 @@ opencv-python
12
  opencv-contrib-python
13
  gradio
14
  huggingface_hub==0.22.2
15
- IPython
 
 
12
  opencv-contrib-python
13
  gradio
14
  huggingface_hub==0.22.2
15
+ IPython
16
+ spaces