vilarin commited on
Commit
bb262d7
·
verified ·
1 Parent(s): 8d53bf7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -3,10 +3,10 @@ import torch
3
  import spaces
4
  import gradio as gr
5
  from diffusers import FluxFillPipeline
6
- from diffusers.utils import load_image
7
  import random
8
  import numpy as np
9
  from huggingface_hub import hf_hub_download
 
10
 
11
 
12
  CSS = """
@@ -65,10 +65,10 @@ def inpaintGen(
65
  if not mask_path:
66
  raise gr.Error("Please draw a mask on the image.")
67
 
68
- source_img = load_image(source_path)
69
- mask_img = load_image(mask_path)
70
 
71
- mask_img = create_mask_image(mask_img)
72
 
73
  width, height = source_img.size
74
 
 
3
  import spaces
4
  import gradio as gr
5
  from diffusers import FluxFillPipeline
 
6
  import random
7
  import numpy as np
8
  from huggingface_hub import hf_hub_download
9
+ from PIL import Image, ImageOps
10
 
11
 
12
  CSS = """
 
65
  if not mask_path:
66
  raise gr.Error("Please draw a mask on the image.")
67
 
68
+ source_img = Image.open(source_path).convert("RGB")
69
+ mask_img = Image.open(mask_path).convert('L')
70
 
71
+ #mask_img = create_mask_image(mask_img)
72
 
73
  width, height = source_img.size
74