File size: 738 Bytes
d0f716d
 
78f883e
d0f716d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
"""
File: practical_tasks.py
Author: Elena Ryumina and Dmitry Ryumin
Description: Utility functions for working with practical tasks data.
License: MIT License
"""

import yaml
from typing import Dict, List

# Importing necessary components for the Gradio app


def load_practical_tasks_data(file_path: str) -> List:
    with open(file_path, "r") as file:
        return yaml.safe_load(file) or []


def transform_practical_tasks_data(data: List) -> Dict:
    output_dict = {item["task"]: item["subtasks"] for item in data}

    return output_dict


yaml_file_path = "./practical_tasks.yaml"
practical_tasks_data = load_practical_tasks_data(yaml_file_path)
supported_practical_tasks = transform_practical_tasks_data(practical_tasks_data)