Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -13,6 +13,8 @@ client = rg.Argilla(
|
|
| 13 |
api_key=os.getenv("ARGILLA_API_KEY"),
|
| 14 |
)
|
| 15 |
|
|
|
|
|
|
|
| 16 |
def get_progress(dataset: rg.Dataset) -> dict:
|
| 17 |
dataset_progress = dataset.progress(with_users_distribution=True)
|
| 18 |
|
|
@@ -365,16 +367,6 @@ def update_dashboard(dataset_idx: int| None = None):
|
|
| 365 |
with gr.Blocks() as demo:
|
| 366 |
gr.Markdown("# Argilla Dataset Dashboard")
|
| 367 |
|
| 368 |
-
datasets_dropdown = gr.Dropdown(label="Select your dataset")
|
| 369 |
-
datasets_dropdown.choices = [(dataset.name, idx) for idx, dataset in enumerate(datasets)]
|
| 370 |
-
|
| 371 |
-
def set_selected_dataset(dataset_idx) -> None:
|
| 372 |
-
global selected_dataset
|
| 373 |
-
|
| 374 |
-
dataset = datasets[dataset_idx]
|
| 375 |
-
selected_dataset = dataset
|
| 376 |
-
|
| 377 |
-
|
| 378 |
with gr.Row():
|
| 379 |
gauge_output = gr.Plot(label="Overall Progress")
|
| 380 |
treemap_output = gr.Plot(label="User contributions")
|
|
|
|
| 13 |
api_key=os.getenv("ARGILLA_API_KEY"),
|
| 14 |
)
|
| 15 |
|
| 16 |
+
global selected_dataset = os.getenv("DATASET_NAME")
|
| 17 |
+
|
| 18 |
def get_progress(dataset: rg.Dataset) -> dict:
|
| 19 |
dataset_progress = dataset.progress(with_users_distribution=True)
|
| 20 |
|
|
|
|
| 367 |
with gr.Blocks() as demo:
|
| 368 |
gr.Markdown("# Argilla Dataset Dashboard")
|
| 369 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 370 |
with gr.Row():
|
| 371 |
gauge_output = gr.Plot(label="Overall Progress")
|
| 372 |
treemap_output = gr.Plot(label="User contributions")
|