Mariusz Kossakowski commited on
Commit
e9b6b65
1 Parent(s): a619100

Add old typing

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -1,4 +1,5 @@
1
  import re
 
2
 
3
  from datasets import load_dataset
4
  import pandas as pd
@@ -11,7 +12,7 @@ from unidecode import unidecode
11
  DATA_SPLITS = ["train", "validation", "test"]
12
 
13
 
14
- def load_data() -> dict[str, pd.DataFrame]:
15
  return {
16
  data: pd.read_csv(f"data/{data}.csv").rename(
17
  {"label": "target"}, axis="columns"
@@ -20,7 +21,7 @@ def load_data() -> dict[str, pd.DataFrame]:
20
  }
21
 
22
 
23
- def flatten_list(main_list: list[list]) -> list:
24
  return [item for sublist in main_list for item in sublist]
25
 
26
 
 
1
  import re
2
+ from typing import Dict, List
3
 
4
  from datasets import load_dataset
5
  import pandas as pd
 
12
  DATA_SPLITS = ["train", "validation", "test"]
13
 
14
 
15
+ def load_data() -> Dict[str, pd.DataFrame]:
16
  return {
17
  data: pd.read_csv(f"data/{data}.csv").rename(
18
  {"label": "target"}, axis="columns"
 
21
  }
22
 
23
 
24
+ def flatten_list(main_list: List[List]) -> List:
25
  return [item for sublist in main_list for item in sublist]
26
 
27