Update app.py
Browse files
app.py
CHANGED
@@ -422,17 +422,20 @@ def create_gradio_interface():
|
|
422 |
*weather_params
|
423 |
)
|
424 |
|
425 |
-
with gr.Blocks(
|
|
|
|
|
|
|
426 |
with gr.Column():
|
427 |
gr.Markdown("# Renewable Energy Potential Predictor")
|
428 |
|
429 |
-
# ์
๋ ฅ ์น์
-
|
430 |
with gr.Row(equal_height=True):
|
431 |
# ์ด๋ฏธ์ง/ํ์ผ ์
๋ ฅ
|
432 |
rgb_input = gr.Image(label="RGB Satellite Image", type="numpy", height=150, scale=1)
|
433 |
ndvi_input = gr.Image(label="NDVI Image", type="numpy", height=150, scale=1)
|
434 |
terrain_input = gr.Image(label="Terrain Map", type="numpy", height=150, scale=1)
|
435 |
-
elevation_input = gr.File(label="Elevation Data (NPY)",
|
436 |
|
437 |
# ๋ ์จ ํ๋ผ๋ฏธํฐ ์
๋ ฅ
|
438 |
with gr.Column(scale=1):
|
@@ -443,7 +446,8 @@ def create_gradio_interface():
|
|
443 |
predict_btn = gr.Button("Generate Predictions", variant="primary", size="lg")
|
444 |
|
445 |
# ์ถ๋ ฅ ์น์
- ์ ์ฒด ๋๋น ์ฌ์ฉ
|
446 |
-
|
|
|
447 |
|
448 |
# ์์ ์น์
|
449 |
examples = load_examples_from_directory("filtered_climate_data")
|
|
|
422 |
*weather_params
|
423 |
)
|
424 |
|
425 |
+
with gr.Blocks(css="""
|
426 |
+
.contain {margin-left: auto; margin-right: auto; max-height: 800px}
|
427 |
+
.plot-container {height: 600px !important; width: 100% !important;}
|
428 |
+
""") as interface:
|
429 |
with gr.Column():
|
430 |
gr.Markdown("# Renewable Energy Potential Predictor")
|
431 |
|
432 |
+
# ์
๋ ฅ ์น์
- ํ๋์ Row์ ๋ชจ๋ ์
๋ ฅ ๋ฐฐ์น
|
433 |
with gr.Row(equal_height=True):
|
434 |
# ์ด๋ฏธ์ง/ํ์ผ ์
๋ ฅ
|
435 |
rgb_input = gr.Image(label="RGB Satellite Image", type="numpy", height=150, scale=1)
|
436 |
ndvi_input = gr.Image(label="NDVI Image", type="numpy", height=150, scale=1)
|
437 |
terrain_input = gr.Image(label="Terrain Map", type="numpy", height=150, scale=1)
|
438 |
+
elevation_input = gr.File(label="Elevation Data (NPY)", scale=1)
|
439 |
|
440 |
# ๋ ์จ ํ๋ผ๋ฏธํฐ ์
๋ ฅ
|
441 |
with gr.Column(scale=1):
|
|
|
446 |
predict_btn = gr.Button("Generate Predictions", variant="primary", size="lg")
|
447 |
|
448 |
# ์ถ๋ ฅ ์น์
- ์ ์ฒด ๋๋น ์ฌ์ฉ
|
449 |
+
with gr.Box(elem_classes="plot-container"):
|
450 |
+
output_plot = gr.Plot(label="Prediction Results", container=True)
|
451 |
|
452 |
# ์์ ์น์
|
453 |
examples = load_examples_from_directory("filtered_climate_data")
|