Sadjad Alikhani commited on
Commit
c9b91a3
·
verified ·
1 Parent(s): bd2ccaf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +27 -5
app.py CHANGED
@@ -456,6 +456,16 @@ with gr.Blocks(css="""
456
  text-align: center;
457
  }
458
 
 
 
 
 
 
 
 
 
 
 
459
  """) as demo:
460
 
461
  # Contact Section
@@ -469,11 +479,18 @@ with gr.Blocks(css="""
469
  </a>
470
  </div>
471
  """)
472
-
473
  # Tab for Beam Prediction Task
474
  with gr.Tab("Beam Prediction Task"):
475
  gr.Markdown("### Beam Prediction Task")
476
-
 
 
 
 
 
 
 
477
  with gr.Row():
478
  with gr.Column():
479
  data_percentage_slider = gr.Slider(label="Data Percentage for Training", minimum=10, maximum=100, step=10, value=10)
@@ -491,12 +508,16 @@ with gr.Blocks(css="""
491
  with gr.Tab("LoS/NLoS Classification Task"):
492
  gr.Markdown("### LoS/NLoS Classification Task")
493
 
 
 
 
 
 
 
 
494
  # Radio button for user choice: predefined data or upload dataset
495
  choice_radio = gr.Radio(choices=["Use Default Dataset", "Upload Dataset"], label="Choose how to proceed", value="Use Default Dataset")
496
 
497
- # Dropdown for selecting percentage for predefined data
498
- #percentage_dropdown_los = gr.Dropdown(choices=[f"{value:.3f}" for value in percentage_values_los], value=f"{percentage_values_los[0]:.3f}", label="Percentage of Data for Training")
499
- #percentage_dropdown_los = gr.Dropdown(choices=list(range(20)), value=0, label="Percentage of Data for Training")
500
  percentage_slider_los = gr.Slider(minimum=float(percentage_values_los[0]),
501
  maximum=float(percentage_values_los[-1]),
502
  step=float(percentage_values_los[1] - percentage_values_los[0]),
@@ -526,6 +547,7 @@ with gr.Blocks(css="""
526
  percentage_slider_los.change(fn=handle_user_choice, inputs=[choice_radio, percentage_slider_los, file_input],
527
  outputs=[raw_img_los, embeddings_img_los, output_textbox])
528
 
 
529
  # Launch the app
530
  if __name__ == "__main__":
531
  demo.launch()
 
456
  text-align: center;
457
  }
458
 
459
+ .explanation-box {
460
+ font-size: 16px;
461
+ font-style: italic;
462
+ color: #4a4a4a;
463
+ padding: 15px;
464
+ background-color: #f0f0f0;
465
+ border-radius: 10px;
466
+ margin-bottom: 20px;
467
+ }
468
+
469
  """) as demo:
470
 
471
  # Contact Section
 
479
  </a>
480
  </div>
481
  """)
482
+
483
  # Tab for Beam Prediction Task
484
  with gr.Tab("Beam Prediction Task"):
485
  gr.Markdown("### Beam Prediction Task")
486
+
487
+ # Explanation section with creative spacing and minimal design
488
+ gr.Markdown("""
489
+ <div class="explanation-box">
490
+ In this task, you'll predict the strongest mmWave beam from a predefined codebook based on Sub-6 GHz channels. Adjust the data percentage and task complexity to observe how LWM performs on different settings.
491
+ </div>
492
+ """)
493
+
494
  with gr.Row():
495
  with gr.Column():
496
  data_percentage_slider = gr.Slider(label="Data Percentage for Training", minimum=10, maximum=100, step=10, value=10)
 
508
  with gr.Tab("LoS/NLoS Classification Task"):
509
  gr.Markdown("### LoS/NLoS Classification Task")
510
 
511
+ # Explanation section with creative spacing
512
+ gr.Markdown("""
513
+ <div class="explanation-box">
514
+ Use this task to classify whether a channel is LoS (Line-of-Sight) or NLoS (Non-Line-of-Sight). You can either upload your own dataset or use the default dataset to explore how LWM embeddings compare to raw channels.
515
+ </div>
516
+ """)
517
+
518
  # Radio button for user choice: predefined data or upload dataset
519
  choice_radio = gr.Radio(choices=["Use Default Dataset", "Upload Dataset"], label="Choose how to proceed", value="Use Default Dataset")
520
 
 
 
 
521
  percentage_slider_los = gr.Slider(minimum=float(percentage_values_los[0]),
522
  maximum=float(percentage_values_los[-1]),
523
  step=float(percentage_values_los[1] - percentage_values_los[0]),
 
547
  percentage_slider_los.change(fn=handle_user_choice, inputs=[choice_radio, percentage_slider_los, file_input],
548
  outputs=[raw_img_los, embeddings_img_los, output_textbox])
549
 
550
+
551
  # Launch the app
552
  if __name__ == "__main__":
553
  demo.launch()