linoyts HF staff commited on
Commit
973980e
·
verified ·
1 Parent(s): eecf624

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -97,7 +97,7 @@ TMP_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'tmp')
97
  os.makedirs(TMP_DIR, exist_ok=True)
98
 
99
  def reset_canvas():
100
- return gr.update({"background":Image.new("RGB", (512, 512), (255, 255, 255)), "layers":[Image.new("RGB", (512, 512), (255, 255, 255))], "composite":Image.new("RGB", (512, 512), (255, 255, 255))})
101
 
102
  def apply_style(style_name: str, positive: str, negative: str = "") -> tuple[str, str]:
103
  p, n = styles.get(style_name, styles[DEFAULT_STYLE_NAME])
 
97
  os.makedirs(TMP_DIR, exist_ok=True)
98
 
99
  def reset_canvas():
100
+ return gr.ImageMask.update(value={"background":Image.new("RGB", (512, 512), (255, 255, 255)), "layers":[Image.new("RGB", (512, 512), (255, 255, 255))], "composite":Image.new("RGB", (512, 512), (255, 255, 255))})
101
 
102
  def apply_style(style_name: str, positive: str, negative: str = "") -> tuple[str, str]:
103
  p, n = styles.get(style_name, styles[DEFAULT_STYLE_NAME])