cellverse commited on
Commit
ca1108c
·
verified ·
1 Parent(s): 67257b3

interface update

Browse files
Files changed (1) hide show
  1. app.py +19 -28
app.py CHANGED
@@ -146,24 +146,13 @@ def clear_images() -> tuple:
146
  return None, None, None, gr.update(maximum=1024), gr.update(maximum=1024)
147
 
148
  with gr.Blocks(css="""
149
- .gradio-container {
150
- background-color: #f7f9fc;
151
- font-family: Arial, sans-serif;
152
- }
153
- .title-text {
154
- text-align: center;
155
- font-size: 30px;
156
- font-weight: bold;
157
- margin-bottom: 10px;
158
- }
159
- .description-text {
160
- text-align: center;
161
- font-size: 18px;
162
- margin-bottom: 20px;
163
- }
164
  """) as demo:
165
  # Centered Title and Description
166
- with gr.Column():
167
  gr.Markdown(
168
  """
169
  <div style="text-align: center; font-size: 30px; font-weight: bold; margin-bottom: 10px;">
@@ -173,20 +162,22 @@ with gr.Blocks(css="""
173
  Upload a Raw file or select an example to view the original and denoised images
174
  </div>
175
  """
176
- )
177
-
178
- example_selector = gr.Radio(label="Choose an example Raw Micrograph File", choices=list(example_files.keys()))
179
- file_input = gr.File(label="Or upload a Micrograph File in .h5 or .mrc format")
180
- auto_contrast = gr.Checkbox(label="Enable Auto Contrast", value=False)
181
-
182
- x_slider = gr.Slider(0, 1024, step=100, label="X Offset")
183
- y_slider = gr.Slider(0, 1024, step=100, label="Y Offset")
 
 
184
 
185
- with gr.Row():
186
- denoise_button = gr.Button("Denoise")
187
- clear_button = gr.Button("Clear")
188
 
189
- with gr.Row():
190
  with gr.Column():
191
  original_image = gr.Image(type="pil", label="Original Image")
192
  with gr.Column():
 
146
  return None, None, None, gr.update(maximum=1024), gr.update(maximum=1024)
147
 
148
  with gr.Blocks(css="""
149
+ .custom-size {
150
+ width: 735px;
151
+ height: 127px;
152
+ }
 
 
 
 
 
 
 
 
 
 
 
153
  """) as demo:
154
  # Centered Title and Description
155
+ with gr.Row():
156
  gr.Markdown(
157
  """
158
  <div style="text-align: center; font-size: 30px; font-weight: bold; margin-bottom: 10px;">
 
162
  Upload a Raw file or select an example to view the original and denoised images
163
  </div>
164
  """
165
+ )
166
+ with gr.Row():
167
+ with gr.Column():
168
+ example_selector = gr.Radio(label="Choose an example Raw Micrograph File", choices=list(example_files.keys()))
169
+ file_input = gr.File(label="Or upload a Micrograph File in .h5 or .mrc format")
170
+
171
+ with gr.Column():
172
+ auto_contrast = gr.Checkbox(label="Enable Auto Contrast", value=False, elem_classes=["custom-size"])
173
+ x_slider = gr.Slider(0, 1024, step=10, label="X Offset", elem_classes=["custom-size"])
174
+ y_slider = gr.Slider(0, 1024, step=10, label="Y Offset", elem_classes=["custom-size"])
175
 
176
+ with gr.Row():
177
+ denoise_button = gr.Button("Denoise")
178
+ clear_button = gr.Button("Clear")
179
 
180
+ with gr.Row():
181
  with gr.Column():
182
  original_image = gr.Image(type="pil", label="Original Image")
183
  with gr.Column():