File size: 2,734 Bytes
7801a87
 
e638176
7801a87
 
 
 
 
 
 
 
 
 
e638176
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
---
title: H4rmonyEval
emoji: 🌍
colorFrom: purple
colorTo: gray
sdk: gradio
sdk_version: 5.27.0
app_file: app.py
pinned: false
license: mit
short_description: Model Judge For Ecolinguistic Evaluation
---

# πŸ¦β€β¬› H4rmonyEval: Model Judge for Ecolinguistic Evaluation

**H4rmonyEval** is a specialised evaluation tool designed to assess language model outputs through an **ecolinguistic** perspective. It enables both single prompt evaluation and batch assessments via CSV, focusing on how well model responses align with ecological and sustainable narratives.

Hosted on **Hugging Face Spaces**, powered by **Gradio**.

---

## 🌿 Features

- **Single Q&A Evaluation**  
  Quickly score individual prompt/answer pairs on a scale of **0–5**.

- **Batch CSV Evaluation**  
  Upload a CSV with questions (and optional answers) for automated scoring. Download detailed results.

- **Ecolinguistic-Aware Judging**  
  Leveraging a Cohere language model with custom system instructions based on ecolinguistic principles.

---

## πŸ“„ CSV Format

- Required: `question` column.
- Optional: `answer` column (if empty, the system generates answers using a selected model).

Example:

| question                | answer               |
|-------------------------|----------------------|
| What is green AI?       | AI focused on...     |
| Define ecological ethics|                      |

---

## 🎯 Scoring System

- **5** – Perfect, accurate, and ecologically aligned.
- **3** – Partially correct, limited ecological framing.
- **0** – Incorrect or ecologically harmful/misaligned.

Final scores are presented as percentages for batch evaluations.

---

## βš™οΈ How It Works

- **Judge:** Cohere `command-r-plus` model guided by custom instructions.
- **Answer Generation:** Hugging Face Inference API (if no answer is provided).
- **Frontend:** Gradio `5.27.0`.

---

## πŸš€ Quick Start

1. Upload your CSV **or** enter a single Q&A.
2. Click the appropriate evaluation button.
3. View your score and download results.

---

## πŸ” Environment Variables

- `COHERE_API_KEY` – Required.
- `HF_TOKEN` – *(Optional)* For Hugging Face Inference.

---

## 🌍 About H4rmony

Part of the **H4rmony Project**, promoting AI aligned with ecological justice and sustainability through language.

Learn more:  
πŸ”— https://TheH4rmonyProject.org
---

## 🀝 Acknowledgements

- **Cohere** for LLM infrastructure.
- **Hugging Face** for Spaces and APIs.
- Inspired by the work of the **The H4rmony Project, University of Gloucestershire & International Ecolinguistics Association**.

---

## πŸ“œ License

MIT License.

---

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