OzzyGT HF staff commited on
Commit
97567b1
1 Parent(s): a24e237

fix gradio version again

Browse files
Files changed (2) hide show
  1. app.py +17 -8
  2. requirements.txt +1 -1
app.py CHANGED
@@ -82,25 +82,28 @@ def clear_result():
82
  return gr.update(value=None)
83
 
84
 
 
 
 
 
 
 
 
85
  title = """<h1 align="center">Diffusers Image Fill</h1>
86
  <div align="center">Draw the mask over the subject you want to erase or change.</div>
87
  """
88
 
89
- with gr.Blocks() as demo:
90
  gr.HTML(title)
91
- with gr.Row():
92
- model_selection = gr.Dropdown(
93
- choices=list(MODELS.keys()),
94
- value="RealVisXL V5.0 Lightning",
95
- label="Model",
96
- )
97
- run_button = gr.Button("Generate")
98
 
99
  with gr.Row():
100
  input_image = gr.ImageMask(
101
  type="pil",
102
  label="Input Image",
103
  crop_size=(1024, 1024),
 
104
  layers=False,
105
  sources=["upload"],
106
  )
@@ -110,6 +113,12 @@ with gr.Blocks() as demo:
110
  label="Generated Image",
111
  )
112
 
 
 
 
 
 
 
113
  run_button.click(
114
  fn=clear_result,
115
  inputs=None,
 
82
  return gr.update(value=None)
83
 
84
 
85
+ css = """
86
+ .gradio-container {
87
+ width: 1024px !important;
88
+ }
89
+ """
90
+
91
+
92
  title = """<h1 align="center">Diffusers Image Fill</h1>
93
  <div align="center">Draw the mask over the subject you want to erase or change.</div>
94
  """
95
 
96
+ with gr.Blocks(css=css) as demo:
97
  gr.HTML(title)
98
+
99
+ run_button = gr.Button("Generate")
 
 
 
 
 
100
 
101
  with gr.Row():
102
  input_image = gr.ImageMask(
103
  type="pil",
104
  label="Input Image",
105
  crop_size=(1024, 1024),
106
+ canvas_size=(1024, 1024),
107
  layers=False,
108
  sources=["upload"],
109
  )
 
113
  label="Generated Image",
114
  )
115
 
116
+ model_selection = gr.Dropdown(
117
+ choices=list(MODELS.keys()),
118
+ value="RealVisXL V5.0 Lightning",
119
+ label="Model",
120
+ )
121
+
122
  run_button.click(
123
  fn=clear_result,
124
  inputs=None,
requirements.txt CHANGED
@@ -1,6 +1,6 @@
1
  torch
2
  spaces
3
- gradio
4
  gradio-imageslider
5
  numpy==1.26.4
6
  transformers
 
1
  torch
2
  spaces
3
+ gradio==4.42.0
4
  gradio-imageslider
5
  numpy==1.26.4
6
  transformers