Spaces:
Sleeping
Sleeping
remove custom css, add theme
Browse files
app.py
CHANGED
|
@@ -140,17 +140,8 @@ def get_dataset(dataset_name):
|
|
| 140 |
|
| 141 |
### Gradio Blocks interface
|
| 142 |
|
| 143 |
-
# Define custom CSS
|
| 144 |
-
custom_css = """
|
| 145 |
-
.fixed-textbox textarea {
|
| 146 |
-
height: 100px !important; /* Adjust height to fit exactly 4 lines */
|
| 147 |
-
overflow: scroll; /* Add a scroll bar if necessary */
|
| 148 |
-
resize: none; /* User can resize vertically the textbox */
|
| 149 |
-
}
|
| 150 |
-
"""
|
| 151 |
-
|
| 152 |
title = "Inverse problem playground" # displayed on gradio tab and in the gradio page
|
| 153 |
-
with gr.Blocks(title=title,
|
| 154 |
gr.Markdown("## " + title)
|
| 155 |
|
| 156 |
# DEFAULT VALUES
|
|
@@ -189,13 +180,13 @@ with gr.Blocks(title=title, css=custom_css) as interface:
|
|
| 189 |
load_random_button = gr.Button("Run on random image from dataset")
|
| 190 |
with gr.Column():
|
| 191 |
observed_metrics = gr.Textbox(label="PSNR(Observed, Ground-truth)",
|
| 192 |
-
|
| 193 |
with gr.Column():
|
| 194 |
out_a_metric = gr.Textbox(label="PSNR(RAM(Observed, Ground-truth)",
|
| 195 |
-
|
| 196 |
with gr.Column():
|
| 197 |
out_b_metric = gr.Textbox(label="PSNR(DPIR(Observed, Ground-truth)",
|
| 198 |
-
|
| 199 |
|
| 200 |
# Manage physics
|
| 201 |
with gr.Row():
|
|
@@ -212,7 +203,7 @@ with gr.Blocks(title=title, css=custom_css) as interface:
|
|
| 212 |
update_button = gr.Button("Manually update parameter value")
|
| 213 |
with gr.Column(scale=2):
|
| 214 |
physics_params = gr.Textbox(label="Physics parameters",
|
| 215 |
-
|
| 216 |
value=physics.display_saved_params())
|
| 217 |
|
| 218 |
|
|
|
|
| 140 |
|
| 141 |
### Gradio Blocks interface
|
| 142 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 143 |
title = "Inverse problem playground" # displayed on gradio tab and in the gradio page
|
| 144 |
+
with gr.Blocks(title=title, theme=gr.themes.Soft()) as interface:
|
| 145 |
gr.Markdown("## " + title)
|
| 146 |
|
| 147 |
# DEFAULT VALUES
|
|
|
|
| 180 |
load_random_button = gr.Button("Run on random image from dataset")
|
| 181 |
with gr.Column():
|
| 182 |
observed_metrics = gr.Textbox(label="PSNR(Observed, Ground-truth)",
|
| 183 |
+
lines=1)
|
| 184 |
with gr.Column():
|
| 185 |
out_a_metric = gr.Textbox(label="PSNR(RAM(Observed, Ground-truth)",
|
| 186 |
+
lines=1)
|
| 187 |
with gr.Column():
|
| 188 |
out_b_metric = gr.Textbox(label="PSNR(DPIR(Observed, Ground-truth)",
|
| 189 |
+
lines=1)
|
| 190 |
|
| 191 |
# Manage physics
|
| 192 |
with gr.Row():
|
|
|
|
| 203 |
update_button = gr.Button("Manually update parameter value")
|
| 204 |
with gr.Column(scale=2):
|
| 205 |
physics_params = gr.Textbox(label="Physics parameters",
|
| 206 |
+
lines=5,
|
| 207 |
value=physics.display_saved_params())
|
| 208 |
|
| 209 |
|