Mark Liu commited on
Commit
9c74087
·
verified ·
1 Parent(s): b521f67

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -1,5 +1,6 @@
1
  import gradio as gr
2
  import torch
 
3
 
4
  from diffusers import AutoPipelineForInpainting, UNet2DConditionModel
5
  import diffusers
@@ -16,6 +17,7 @@ def read_content(file_path: str) -> str:
16
 
17
  return content
18
 
 
19
  def predict(dict, prompt="", negative_prompt="", guidance_scale=7.5, steps=20, strength=1.0, scheduler="EulerDiscreteScheduler"):
20
  if negative_prompt == "":
21
  negative_prompt = None
 
1
  import gradio as gr
2
  import torch
3
+ import spaces
4
 
5
  from diffusers import AutoPipelineForInpainting, UNet2DConditionModel
6
  import diffusers
 
17
 
18
  return content
19
 
20
+ @spaces.GPU(duration=120)
21
  def predict(dict, prompt="", negative_prompt="", guidance_scale=7.5, steps=20, strength=1.0, scheduler="EulerDiscreteScheduler"):
22
  if negative_prompt == "":
23
  negative_prompt = None