Spaces:
Sleeping
Sleeping
update
Browse files
app.py
CHANGED
|
@@ -5,9 +5,11 @@ import os
|
|
| 5 |
|
| 6 |
def load_rfm_dataset(dataset_name, config_name):
|
| 7 |
"""Load the RFM dataset from HuggingFace Hub."""
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
|
|
|
|
|
|
| 11 |
|
| 12 |
def get_available_configs(dataset_name):
|
| 13 |
"""Get available configurations for a dataset."""
|
|
@@ -16,6 +18,7 @@ def get_available_configs(dataset_name):
|
|
| 16 |
configs = list(dataset_info.keys())
|
| 17 |
return configs
|
| 18 |
except Exception as e:
|
|
|
|
| 19 |
return []
|
| 20 |
|
| 21 |
def visualize_trajectory(dataset, index):
|
|
|
|
| 5 |
|
| 6 |
def load_rfm_dataset(dataset_name, config_name):
|
| 7 |
"""Load the RFM dataset from HuggingFace Hub."""
|
| 8 |
+
try:
|
| 9 |
+
dataset = load_dataset_hf(dataset_name, name=config_name, split="train")
|
| 10 |
+
return dataset, f"✅ Loaded {len(dataset)} trajectories from {dataset_name}/{config_name}"
|
| 11 |
+
except Exception as e:
|
| 12 |
+
return None, f"❌ Error loading dataset: {e}"
|
| 13 |
|
| 14 |
def get_available_configs(dataset_name):
|
| 15 |
"""Get available configurations for a dataset."""
|
|
|
|
| 18 |
configs = list(dataset_info.keys())
|
| 19 |
return configs
|
| 20 |
except Exception as e:
|
| 21 |
+
print(f"Error getting configs: {e}")
|
| 22 |
return []
|
| 23 |
|
| 24 |
def visualize_trajectory(dataset, index):
|