File size: 1,429 Bytes
fc6e24b
 
 
 
 
 
 
 
 
 
 
 
 
b039ccb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
---
title: FLARE
emoji: 🐠
colorFrom: pink
colorTo: pink
sdk: gradio
sdk_version: 3.34.0
app_file: app.py
pinned: false
license: mit
---

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference

## Add New Language

1. Add new `[LAN]_result.csv`, which should be format like

|Model|Task Metric 1|Task Metric 2|
|---|---|---|
|GPT-4|0.28|0|

2. Add new COL variable on `app.py`

```python
SPA_COLS = [
    ("Model", "str"),
    ("MultiFin-F1", "number"),
]
```

3. Add new Col categorization on `app.py`

```python
spa_cols = [col_name for col_name, _ in SPA_COLS]
spa_cates = {
    "Sentiment Analysis": ["Model", "TSA-Acc", "TSA-F1", "FinanceES-Acc", "FinanceES-F1"],
    "Examination": ["Model", "EFP-Acc", "EFP-F1", "EFPA-Acc", "EFPA-F1"],
    "Classification": ["Model", "MultiFin-Acc", "MultiFin-F1"],
    "Text Summarization": ["Model", "FNS-Rouge1", "FNS-Rouge2", "FNS-RougeL",],
}
```

4. Add new key to lan dict on `app.py` 

```python
df_lang = {
    "English": create_df_dict("english", eng_cols, eng_cates),
    "Spanish": create_df_dict("spanish", spa_cols, spa_cates),
}
```

5. If new categories need to define new column selection rules, add it like:

```python
elif key == "Credit Scoring":
    tdf = tdf[[val for val in tdf.columns if "Acc" in val]]
elif key == "Text Summarization":
    tdf = tdf[[val for val in tdf.columns if "Bert" in val or "Rouge" in val]]
```