praeclarumjj3 commited on
Commit
4530503
1 Parent(s): 02ccc3e

Finalize demo

Browse files
Files changed (2) hide show
  1. README.md +2 -2
  2. app.py +4 -4
README.md CHANGED
@@ -1,7 +1,7 @@
1
  ---
2
  title: FcF Inpainting
3
- emoji: 🚧
4
- colorFrom: red
5
  colorTo: purple
6
  sdk: gradio
7
  sdk_version: 2.9.4
 
1
  ---
2
  title: FcF Inpainting
3
+ emoji: 🪄 ✨ ✨
4
+ colorFrom: blue
5
  colorTo: purple
6
  sdk: gradio
7
  sdk_version: 2.9.4
app.py CHANGED
@@ -96,12 +96,12 @@ def inpaint(input_img, mask, option):
96
  rgb_erased = rgb_erased * (1 - mask_tensor) # erase rgb
97
  rgb_erased = rgb_erased.to(torch.float32)
98
 
99
- # model = create_model("models/places_512.pkl")
100
- # comp_img = fcf_inpaint(G=model, org_img=rgb.to(torch.float32), erased_img=rgb_erased.to(torch.float32), mask=mask_tensor.to(torch.float32))
101
  rgb_erased = denorm(rgb_erased)
102
- # comp_img = denorm(comp_img)
103
 
104
- return show_images(rgb_erased), show_images(rgb_erased)
105
 
106
  gradio_inputs = [gr.inputs.Image(type='pil',
107
  tool=None,
 
96
  rgb_erased = rgb_erased * (1 - mask_tensor) # erase rgb
97
  rgb_erased = rgb_erased.to(torch.float32)
98
 
99
+ model = create_model("models/places_512.pkl")
100
+ comp_img = fcf_inpaint(G=model, org_img=rgb.to(torch.float32), erased_img=rgb_erased.to(torch.float32), mask=mask_tensor.to(torch.float32))
101
  rgb_erased = denorm(rgb_erased)
102
+ comp_img = denorm(comp_img)
103
 
104
+ return show_images(rgb_erased), show_images(comp_img)
105
 
106
  gradio_inputs = [gr.inputs.Image(type='pil',
107
  tool=None,