File size: 1,334 Bytes
bcec9c2
 
 
 
 
 
 
bfc23da
bcec9c2
 
 
 
 
 
 
f5f9b38
bcec9c2
61029d0
4f41410
199a7d9
 
 
4f41410
199a7d9
 
4f41410
199a7d9
 
 
 
 
 
 
 
 
 
bfc23da
 
 
 
 
 
 
 
199a7d9
 
 
4f41410
199a7d9
4f41410
5291ba9
 
 
 
 
 
 
 
 
 
 
bcec9c2
 
 
 
 
 
 
 
 
bfc23da
bcec9c2
bfc23da
 
 
bcec9c2
bfc23da
 
 
bcec9c2
 
334d9fc
bcec9c2
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
---
title: InferBench
emoji: 🥇
colorFrom: green
colorTo: indigo
sdk: gradio
app_file: dashboard/app.py
pinned: true
license: apache-2.0
short_description: A cost/quality/speed Leaderboard for Inference Providers!
sdk_version: 5.19.0
tags:
- leaderboard
---

# InferBench

Evaluate the quality and efficiency of image gen api's.

## Installation

### Install dependencies

Install dependencies with conda like that:
```
conda env create -f environment.yml
```

### Install uv

Install uv with pip like that:

```
uv venv --python 3.12
```

Then activate the environment:

```
source .venv/bin/activate
```

Then install the dependencies with uv:

```
uv sync --all-groups
```

## Usage

Create .env file with all the credentials you will need.

This is how you can generate the images.
```
python sample.py replicate draw_bench genai_bench geneval hps parti
```

This is how you would evaluate the benchmarks once you have all images:
```
python evaluate.py replicate draw_bench genai_bench geneval hps parti
```

## Dashboard

To run the dashboard, you can use the following command:

```
python dashboard/app.py
```

To deploy the dashboard, you can use the following commands:

First, add the remote:

```
git remote add hf https://huggingface.co/spaces/PrunaAI/InferBench
```

Then push the changes:

```
git push hf --force
```