Spaces:
Sleeping
Sleeping
Commit
·
a026fe5
1
Parent(s):
51503ea
Add dataset visibility configuration - only show nyc_taxi_small by default
Browse files- app.py +8 -2
- config/app.yaml +8 -0
- src/utils/config_loader.py +5 -0
app.py
CHANGED
|
@@ -120,8 +120,14 @@ def load_prompt_template(dialect: str) -> str:
|
|
| 120 |
|
| 121 |
def get_available_datasets() -> List[str]:
|
| 122 |
"""Get list of available datasets."""
|
| 123 |
-
|
| 124 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 125 |
|
| 126 |
|
| 127 |
def get_available_models() -> List[str]:
|
|
|
|
| 120 |
|
| 121 |
def get_available_datasets() -> List[str]:
|
| 122 |
"""Get list of available datasets."""
|
| 123 |
+
# Get all available datasets
|
| 124 |
+
all_datasets = dataset_manager.get_datasets()
|
| 125 |
+
|
| 126 |
+
# Filter to only show visible datasets from config
|
| 127 |
+
visible_datasets = config_loader.get_visible_datasets()
|
| 128 |
+
|
| 129 |
+
# Return only datasets that are both available and visible
|
| 130 |
+
return [name for name in all_datasets.keys() if name in visible_datasets]
|
| 131 |
|
| 132 |
|
| 133 |
def get_available_models() -> List[str]:
|
config/app.yaml
CHANGED
|
@@ -56,6 +56,14 @@ use_cases:
|
|
| 56 |
- "code_generation"
|
| 57 |
- "documentation"
|
| 58 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
# Available Programming Languages (for code generation)
|
| 60 |
languages:
|
| 61 |
- "python"
|
|
|
|
| 56 |
- "code_generation"
|
| 57 |
- "documentation"
|
| 58 |
|
| 59 |
+
# Visible Datasets (control which datasets appear in UI)
|
| 60 |
+
visible_datasets:
|
| 61 |
+
- "sql_generation/nyc_taxi_small"
|
| 62 |
+
# - "code_generation/python_algorithms" # Disabled
|
| 63 |
+
# - "code_generation/go_algorithms" # Disabled
|
| 64 |
+
# - "documentation/technical_docs" # Disabled
|
| 65 |
+
# - "documentation/api_documentation" # Disabled
|
| 66 |
+
|
| 67 |
# Available Programming Languages (for code generation)
|
| 68 |
languages:
|
| 69 |
- "python"
|
src/utils/config_loader.py
CHANGED
|
@@ -149,6 +149,11 @@ class ConfigLoader:
|
|
| 149 |
"""Get mock SQL configuration."""
|
| 150 |
config = self._load_yaml("metrics.yaml")
|
| 151 |
return config["mock_sql"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 152 |
|
| 153 |
|
| 154 |
# Global configuration loader instance
|
|
|
|
| 149 |
"""Get mock SQL configuration."""
|
| 150 |
config = self._load_yaml("metrics.yaml")
|
| 151 |
return config["mock_sql"]
|
| 152 |
+
|
| 153 |
+
def get_visible_datasets(self) -> list:
|
| 154 |
+
"""Get list of visible datasets from configuration."""
|
| 155 |
+
config = self._load_yaml("app.yaml")
|
| 156 |
+
return config.get("visible_datasets", [])
|
| 157 |
|
| 158 |
|
| 159 |
# Global configuration loader instance
|