Spaces:
Runtime error
Runtime error
Commit
·
a6df994
1
Parent(s):
820bc58
scaling state
Browse files
app.py
CHANGED
|
@@ -126,8 +126,8 @@ if __name__ == "__main__":
|
|
| 126 |
with gr.Column():
|
| 127 |
image = gr.Image(image_mode="RGBA")
|
| 128 |
with gr.Row():
|
| 129 |
-
width = gr.Slider(value=1500, minimum=100, maximum=8000, label="Width"
|
| 130 |
-
height = gr.Slider(value=1500, minimum=100, maximum=8000, label="Height"
|
| 131 |
scale = gr.Slider(value=1.1, minimum=0, maximum=maxScale, step=0.01, label="Input Scale")
|
| 132 |
fit = gr.Button("Submit")
|
| 133 |
|
|
@@ -142,8 +142,8 @@ if __name__ == "__main__":
|
|
| 142 |
return {
|
| 143 |
maxScale: scale
|
| 144 |
}
|
| 145 |
-
image.change(fn=update_scale, inputs=[width, height, image], outputs=maxScale)
|
| 146 |
-
fit.click(fn=process, inputs=[width, height, scale,
|
| 147 |
|
| 148 |
|
| 149 |
demo.launch()
|
|
|
|
| 126 |
with gr.Column():
|
| 127 |
image = gr.Image(image_mode="RGBA")
|
| 128 |
with gr.Row():
|
| 129 |
+
width = gr.Slider(value=1500, minimum=100, maximum=8000, label="Width")
|
| 130 |
+
height = gr.Slider(value=1500, minimum=100, maximum=8000, label="Height")
|
| 131 |
scale = gr.Slider(value=1.1, minimum=0, maximum=maxScale, step=0.01, label="Input Scale")
|
| 132 |
fit = gr.Button("Submit")
|
| 133 |
|
|
|
|
| 142 |
return {
|
| 143 |
maxScale: scale
|
| 144 |
}
|
| 145 |
+
image.change(fn=update_scale, inputs=[width, height, image], outputs=[maxScale])
|
| 146 |
+
fit.click(fn=process, inputs=[width, height, scale, image], outputs=[plot_output, total])
|
| 147 |
|
| 148 |
|
| 149 |
demo.launch()
|