HoeioUser commited on
Commit
0c3d154
ยท
verified ยท
1 Parent(s): cf40356

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -4
app.py CHANGED
@@ -422,17 +422,20 @@ def create_gradio_interface():
422
  *weather_params
423
  )
424
 
425
- with gr.Blocks() as interface:
 
 
 
426
  with gr.Column():
427
  gr.Markdown("# Renewable Energy Potential Predictor")
428
 
429
- # ์ž…๋ ฅ ์„น์…˜ - ๋ชจ๋“  ์ž…๋ ฅ์„ ํ•˜๋‚˜์˜ Row์— ๋ฐฐ์น˜
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)", height=150, scale=1)
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
- output_plot = gr.Plot(label="Prediction Results", container=True, height=600)
 
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")