File size: 2,733 Bytes
d66dbee
 
 
 
 
 
c838604
d66dbee
 
 
 
4df917c
 
 
73e8b86
 
 
619ba0e
73e8b86
619ba0e
 
c838604
 
 
 
 
619ba0e
 
 
 
 
 
 
 
73e8b86
 
 
 
 
 
619ba0e
73e8b86
 
 
 
619ba0e
73e8b86
 
b695eaf
 
 
 
c72d8bf
 
5aa1748
6d880cd
b695eaf
73e8b86
 
c72d8bf
000d4f2
 
f796553
 
 
 
 
 
 
 
 
 
 
 
 
b036221
 
 
 
969c469
 
 
 
 
 
 
 
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
---
title: Arena
emoji: ⚔️
colorFrom: red
colorTo: purple
sdk: gradio
python_version: 3.11
app_file: app.py
pinned: false
---

# [Arena](https://huggingface.co/spaces/yanolja/arena)

Get Involved: [Discuss and contribute on GitHub](https://github.com/yanolja/arena)

## How to run locally

1. **Install Poetry and plugins**

   First, ensure that Poetry is installed. You can install it by following the instructions on the [Poetry website](https://python-poetry.org/docs/#installing-with-pipx).

   After installing Poetry, install the following plugins:

   - [`poetry-plugin-sort`](https://github.com/andrei-shabanski/poetry-plugin-sort?tab=readme-ov-file#installation)
   - [`poetry-plugin-export`](https://github.com/python-poetry/poetry-plugin-export?tab=readme-ov-file#installation)
   - [`poetry-auto-export`](https://github.com/Ddedalus/poetry-auto-export?tab=readme-ov-file#installation)

1. **Activate the virtual environment**

   Use the following command to activate the virtual environment that Poetry has created:

   ```shell
   poetry shell
   ```

1. **Install dependencies**

   With the virtual environment activated, install the project dependencies:

   ```shell
   poetry install
   ```

1. **Run the app**

   Set your environment variables and run the app:

   ```shell
   GOOGLE_CLOUD_PROJECT=<your project id> \
   CREDENTIALS_PATH=<your crednetials path> \
   MODELS_SECRET=<your secret> \
   OPENAI_API_KEY=<your key> \
   ANTHROPIC_API_KEY=<your key> \
   MISTRAL_API_KEY=<your key> \
   GEMINI_API_KEY=<your key> \
   GROQ_API_KEY=<your key> \
   python3 app.py
   ```

   Replace the placeholders with your actual values.

   > To run the app with [auto-reloading](https://www.gradio.app/guides/developing-faster-with-reload-mode), use `gradio app.py --demo-name app` instead of `python3 app.py`.

## Handling GCP credentials for development and deployment

### Local environment

1. Store your credentials in a file on your local machine.
1. Set the `CREDENTIALS_PATH` environment variable to point to this file.
1. The application will read the credentials from this file when running locally.

### Deployment environment

1. Set the `CREDENTIALS` environment variable in your deployment platform's settings to your credentials JSON string.
2. The application will parse and use these credentials when deployed.

## License

This project is licensed under the terms of the Apache 2.0 license. See the [LICENSE](LICENSE) file for more details.

## Contributing

Before you submit any contributions, please make sure to review and agree to our [Contributor License Agreement](CLA.md).

## Code of Conduct

Please read our [Code of Conduct](CODE_OF_CONDUCT.md) before engaging with our community.