multimodalart HF staff commited on
Commit
777ad8e
1 Parent(s): ce1bf6b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -2,12 +2,12 @@ import gradio as gr
2
  import torch
3
  import spaces
4
  from diffusers import FluxInpaintPipeline
5
- from PIL import Image, ImageFile
6
  import io
7
  import numpy as np
8
 
9
  # Enable loading of truncated images
10
- ImageFile.LOAD_TRUNCATED_IMAGES = True
11
 
12
  # Initialize the pipeline
13
  pipe = FluxInpaintPipeline.from_pretrained(
@@ -157,8 +157,7 @@ with gr.Blocks() as demo:
157
  input_image = gr.Image(
158
  label="Upload Logo Image",
159
  type="pil",
160
- height=384,
161
- tool=None # Disable editing tools to prevent corruption
162
  )
163
  prompt_input = gr.Textbox(
164
  label="Where should the logo be applied?",
 
2
  import torch
3
  import spaces
4
  from diffusers import FluxInpaintPipeline
5
+ from PIL import Image #, ImageFile
6
  import io
7
  import numpy as np
8
 
9
  # Enable loading of truncated images
10
+ # ImageFile.LOAD_TRUNCATED_IMAGES = True
11
 
12
  # Initialize the pipeline
13
  pipe = FluxInpaintPipeline.from_pretrained(
 
157
  input_image = gr.Image(
158
  label="Upload Logo Image",
159
  type="pil",
160
+ height=384
 
161
  )
162
  prompt_input = gr.Textbox(
163
  label="Where should the logo be applied?",