Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -154,7 +154,7 @@ def compute_average_confusion_matrix(folder):
|
|
154 |
LOS_PATH = "images_LoS"
|
155 |
|
156 |
# Define the percentage values
|
157 |
-
percentage_values_los = np.linspace(0.001, 1, 20) * 100 # 20 percentage values
|
158 |
|
159 |
from sklearn.metrics import f1_score
|
160 |
import seaborn as sns
|
@@ -381,6 +381,9 @@ def plot_confusion_matrix(y_true, y_pred, title, light_mode=False):
|
|
381 |
|
382 |
|
383 |
def identical_train_test_split(output_emb, output_raw, labels, train_percentage):
|
|
|
|
|
|
|
384 |
N = output_emb.shape[0]
|
385 |
indices = torch.randperm(N)
|
386 |
test_split_index = int(N * 0.20)
|
@@ -632,7 +635,7 @@ with gr.Blocks(css="""
|
|
632 |
|
633 |
percentage_slider_los = gr.Slider(minimum=float(percentage_values_los[0]),
|
634 |
maximum=float(percentage_values_los[-1]),
|
635 |
-
step=float(percentage_values_los[1] - percentage_values_los[0]),
|
636 |
value=float(percentage_values_los[0]),
|
637 |
label="Percentage of Data for Training", interactive=True)
|
638 |
|
@@ -681,8 +684,11 @@ with gr.Blocks(css="""
|
|
681 |
""")
|
682 |
gr.Markdown("""
|
683 |
<div class="explanation-box">
|
684 |
-
To use your preferred DeepMIMO scenarios for the custom dataset, please
|
|
|
|
|
685 |
</div>
|
|
|
686 |
|
687 |
```python
|
688 |
from input_preprocess import DeepMIMO_data_gen deepmimo_data_cleaning label_gen # Import required modules from the model repository
|
|
|
154 |
LOS_PATH = "images_LoS"
|
155 |
|
156 |
# Define the percentage values
|
157 |
+
percentage_values_los = np.linspace(0.05, 1, 20) * 100 # np.linspace(0.001, 1, 20) * 100 # 20 percentage values
|
158 |
|
159 |
from sklearn.metrics import f1_score
|
160 |
import seaborn as sns
|
|
|
381 |
|
382 |
|
383 |
def identical_train_test_split(output_emb, output_raw, labels, train_percentage):
|
384 |
+
|
385 |
+
torch.manual_seed(seed)
|
386 |
+
|
387 |
N = output_emb.shape[0]
|
388 |
indices = torch.randperm(N)
|
389 |
test_split_index = int(N * 0.20)
|
|
|
635 |
|
636 |
percentage_slider_los = gr.Slider(minimum=float(percentage_values_los[0]),
|
637 |
maximum=float(percentage_values_los[-1]),
|
638 |
+
step=float((percentage_values_los[-1] - percentage_values_los[0]) / (len(percentage_values_los) - 1)), #step=float(percentage_values_los[1] - percentage_values_los[0]),
|
639 |
value=float(percentage_values_los[0]),
|
640 |
label="Percentage of Data for Training", interactive=True)
|
641 |
|
|
|
684 |
""")
|
685 |
gr.Markdown("""
|
686 |
<div class="explanation-box">
|
687 |
+
To use your preferred DeepMIMO scenarios for the custom dataset, please
|
688 |
+
<a href="https://huggingface.co/wi-lab/lwm" target="_blank">clone the model and datasets</a>
|
689 |
+
and follow the instructions below:
|
690 |
</div>
|
691 |
+
|
692 |
|
693 |
```python
|
694 |
from input_preprocess import DeepMIMO_data_gen deepmimo_data_cleaning label_gen # Import required modules from the model repository
|