hpoghos commited on
Commit
0f4ab3e
1 Parent(s): c048c54

add spaces logic

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -6,7 +6,7 @@ from os.path import join as opj
6
  import argparse
7
  import datetime
8
  from pathlib import Path
9
- # import spaces
10
  import gradio as gr
11
  import tempfile
12
  import yaml
@@ -55,7 +55,7 @@ inference_generator = torch.Generator(device="cuda")
55
  # -------------------------
56
  # ----- Functionality -----
57
  # -------------------------
58
- # @spaces.GPU
59
  def generate(prompt, num_frames, image, model_name_stage1, model_name_stage2, seed, t, image_guidance, where_to_log=result_fol):
60
  now = datetime.datetime.now()
61
  name = prompt[:100].replace(" ", "_") + "_" + str(now.time()).replace(":", "_").replace(".", "_")
 
6
  import argparse
7
  import datetime
8
  from pathlib import Path
9
+ import spaces
10
  import gradio as gr
11
  import tempfile
12
  import yaml
 
55
  # -------------------------
56
  # ----- Functionality -----
57
  # -------------------------
58
+ @spaces.GPU
59
  def generate(prompt, num_frames, image, model_name_stage1, model_name_stage2, seed, t, image_guidance, where_to_log=result_fol):
60
  now = datetime.datetime.now()
61
  name = prompt[:100].replace(" ", "_") + "_" + str(now.time()).replace(":", "_").replace(".", "_")