radames commited on
Commit
34c0280
1 Parent(s): c489da2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -10,7 +10,7 @@ import time
10
  import psutil
11
  import random
12
  from diffusers.pipelines.stable_diffusion.safety_checker import StableDiffusionSafetyChecker
13
-
14
 
15
  start_time = time.time()
16
  current_steps = 25
@@ -57,7 +57,7 @@ def error_str(error, title="Error"):
57
  else ""
58
  )
59
 
60
-
61
  def inference(
62
  prompt,
63
  neg_prompt,
@@ -259,5 +259,5 @@ with gr.Blocks(css="style.css") as demo:
259
 
260
  print(f"Space built in {time.time() - start_time:.2f} seconds")
261
 
262
- demo.queue(concurrency_count=1)
263
  demo.launch(show_api=False)
 
10
  import psutil
11
  import random
12
  from diffusers.pipelines.stable_diffusion.safety_checker import StableDiffusionSafetyChecker
13
+ import spaces
14
 
15
  start_time = time.time()
16
  current_steps = 25
 
57
  else ""
58
  )
59
 
60
+ @spaces.GPU
61
  def inference(
62
  prompt,
63
  neg_prompt,
 
259
 
260
  print(f"Space built in {time.time() - start_time:.2f} seconds")
261
 
262
+ demo.queue(concurrency_count=1, api_open=False)
263
  demo.launch(show_api=False)