JichenHu commited on
Commit
9a644b2
·
verified ·
1 Parent(s): 1d9759d

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -32
app.py CHANGED
@@ -45,6 +45,7 @@ default_batch_size = 1
45
 
46
 
47
  def process_image_check(path_input):
 
48
  if path_input is None:
49
  raise gr.Error(
50
  "Missing image in the first pane: upload a file or use one from the gallery below."
@@ -109,9 +110,6 @@ def run_demo_server(pipe, vae_2):
109
  theme=gradio_theme,
110
  title="Dereflection Any Image",
111
  css="""
112
- #download {
113
- height: 118px;
114
- }
115
  .slider .inner {
116
  width: 5px;
117
  background: #FFF;
@@ -123,37 +121,15 @@ def run_demo_server(pipe, vae_2):
123
  font-size: 20px !important;
124
  color: crimson !important;
125
  }
126
- h1 {
127
- text-align: center;
128
- display: block;
129
- }
130
- h2 {
131
- text-align: center;
132
- display: block;
133
- }
134
- h3 {
135
- text-align: center;
136
- display: block;
137
- }
138
- .md_feedback li {
139
- margin-bottom: 0px !important;
140
- }
141
- """,
142
- head="""
143
- <script async src="https://www.googletagmanager.com/gtag/js?id=G-1FWSVCGZTG"></script>
144
- <script>
145
- window.dataLayer = window.dataLayer || [];
146
- function gtag() {dataLayer.push(arguments);}
147
- gtag('js', new Date());
148
- gtag('config', 'G-1FWSVCGZTG');
149
- </script>
150
  """,
151
  ) as demo:
152
  gr.Markdown(
153
  """
154
  # Dereflection Any Image
155
  <p align="center">
156
- """
 
 
157
  )
158
 
159
  with gr.Tabs(elem_classes=["tabs"]):
@@ -166,15 +142,14 @@ def run_demo_server(pipe, vae_2):
166
  )
167
  with gr.Row():
168
  image_submit_btn = gr.Button(
169
- value="remove reflection", variant="primary"
170
  )
171
  image_reset_btn = gr.Button(value="Reset")
172
  with gr.Column():
173
  image_output_slider = ImageSlider(
174
- label="outputs",
175
  type="filepath",
176
  show_download_button=True,
177
- show_share_button=True,
178
  interactive=False,
179
  elem_classes="slider",
180
  )
@@ -211,7 +186,6 @@ def run_demo_server(pipe, vae_2):
211
  fn=lambda: (
212
  None,
213
  None,
214
- None,
215
  ),
216
  inputs=[],
217
  outputs=[
 
45
 
46
 
47
  def process_image_check(path_input):
48
+ logging.info(f"Input image path: {path_input}")
49
  if path_input is None:
50
  raise gr.Error(
51
  "Missing image in the first pane: upload a file or use one from the gallery below."
 
110
  theme=gradio_theme,
111
  title="Dereflection Any Image",
112
  css="""
 
 
 
113
  .slider .inner {
114
  width: 5px;
115
  background: #FFF;
 
121
  font-size: 20px !important;
122
  color: crimson !important;
123
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
124
  """,
125
  ) as demo:
126
  gr.Markdown(
127
  """
128
  # Dereflection Any Image
129
  <p align="center">
130
+ Upload an image to remove reflections.
131
+ </p>
132
+ """
133
  )
134
 
135
  with gr.Tabs(elem_classes=["tabs"]):
 
142
  )
143
  with gr.Row():
144
  image_submit_btn = gr.Button(
145
+ value="Remove Reflection", variant="primary"
146
  )
147
  image_reset_btn = gr.Button(value="Reset")
148
  with gr.Column():
149
  image_output_slider = ImageSlider(
150
+ label="Outputs",
151
  type="filepath",
152
  show_download_button=True,
 
153
  interactive=False,
154
  elem_classes="slider",
155
  )
 
186
  fn=lambda: (
187
  None,
188
  None,
 
189
  ),
190
  inputs=[],
191
  outputs=[