wi-lab commited on
Commit
fe8e38f
·
verified ·
1 Parent(s): 9256ca3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -11
app.py CHANGED
@@ -675,26 +675,22 @@ with gr.Blocks(css="""
675
  hdf.create_dataset('labels', data=labels)
676
  print("Dataset saved!")
677
 
 
678
  # To use your preferred DeepMIMO scenarios for the custom dataset, please [clone the model and datasets](https://huggingface.co/wi-lab/lwm) and follow the instructions below:
679
- from input_preprocess import DeepMIMO_data_gen deepmimo_data_cleaning label_gen
680
-
681
  scenario_names = np.array([
682
  "city_18_denver", "city_15_indianapolis", "city_19_oklahoma",
683
  "city_12_fortworth", "city_11_santaclara", "city_7_sandiego"
684
  ])
685
- scenario_name = scenario_names[0]
686
-
687
- deepmimo_data = DeepMIMO_data_gen(scenario_name)
688
- cleaned_deepmimo_data = deepmimo_data_cleaning(deepmimo_data)
689
 
690
- channels = np.squeeze(np.array(cleaned_deepmimo_data), axis=1)
691
- labels = label_gen('LoS/NLoS Classification', deepmimo_data, scenario_name)
692
  ```
693
  """)
694
 
695
-
696
-
697
-
698
  # Launch the app
699
  if __name__ == "__main__":
700
  demo.launch()
 
675
  hdf.create_dataset('labels', data=labels)
676
  print("Dataset saved!")
677
 
678
+
679
  # To use your preferred DeepMIMO scenarios for the custom dataset, please [clone the model and datasets](https://huggingface.co/wi-lab/lwm) and follow the instructions below:
680
+ from input_preprocess import DeepMIMO_data_gen deepmimo_data_cleaning label_gen # Import required modules from the model repository
 
681
  scenario_names = np.array([
682
  "city_18_denver", "city_15_indianapolis", "city_19_oklahoma",
683
  "city_12_fortworth", "city_11_santaclara", "city_7_sandiego"
684
  ])
685
+ scenario_name = scenario_names[0] # Select the scenario by choosing its index.
686
+ deepmimo_data = DeepMIMO_data_gen(scenario_name) # Generates ray-traced wireless channels for the selected scenario.
687
+ cleaned_deepmimo_data = deepmimo_data_cleaning(deepmimo_data) # Filters out users with no direct path to the base station (i.e., users with zero-valued channels).
 
688
 
689
+ channels = np.squeeze(np.array(cleaned_deepmimo_data), axis=1) # The "channels" array is now prepared for packing into the custom dataset in H5 format.
690
+ labels = label_gen('LoS/NLoS Classification', deepmimo_data, scenario_name) # Generates labels for each user, classifying them as Line-of-Sight (LoS) or Non-Line-of-Sight (NLoS), and prepares the "labels" array for inclusion in the custom dataset H5 file.
691
  ```
692
  """)
693
 
 
 
 
694
  # Launch the app
695
  if __name__ == "__main__":
696
  demo.launch()