Spaces:
Running
Running
title: Gaia Chat | |
emoji: 💬 | |
colorFrom: yellow | |
colorTo: purple | |
sdk: gradio | |
sdk_version: 5.0.1 | |
app_file: app.py | |
pinned: false | |
license: mit | |
### Choisir la langue : [Français](#français) | [English](#english) | |
## Français | |
<a name="français"></a> | |
## Description | |
Gaia Chat est un exemple de chatbot utilisant [Gradio](https://gradio.app), [`huggingface_hub`](https://huggingface.co/docs/huggingface_hub/v0.22.2/en/index), et l'[API d'inférence de Hugging Face](https://huggingface.co/docs/api-inference/index). Ce projet montre comment créer un chatbot interactif en utilisant ces outils. | |
## Prérequis | |
- Python 3.6 ou supérieur | |
## Installation | |
### 1. Installer Python | |
Assurez-vous que Python est installé. | |
1. Rendez-vous sur le site officiel de Python : [https://www.python.org/downloads/](https://www.python.org/downloads/) | |
2. Vérifiez l’installation avec la commande : | |
```sh | |
python --version | |
``` | |
### 2. Installer les dépendances | |
Installez les dependances : | |
```sh | |
python -m venv .venv | |
source .venv/bin/activate | |
pip install -r requirements.txt | |
``` | |
### 4. Gener un Access token sur Hugging Face | |
Rendez-vous sur votre profil Hugging Face pour genenez votre Access Token : [https://huggingface.co/settings/tokens](https://huggingface.co/settings/tokens) | |
### 5. Créer et configurer le fichier `.env` | |
1. Créer le fichier `.env` : | |
```sh | |
echo HFTOKEN="votre_token_ici" > .env | |
``` | |
2. Ajouter le token que vous avez créé précédemment dans votre fichier `.env`. | |
### 6. Lancer l'application | |
Exécutez la commande suivante pour démarrer Gaia Chat : | |
```sh | |
python app.py | |
``` | |
Une fois l'application lancée, ouvrez votre navigateur et accédez à l'URL indiquée dans le terminal pour interagir avec le chatbot. | |
--- | |
## English | |
<a name="english"></a> | |
## Description | |
Gaia Chat is an example chatbot using [Gradio](https://gradio.app), [`huggingface_hub`](https://huggingface.co/docs/huggingface_hub/v0.22.2/en/index), and l '[Hugging Face Inference API](https://huggingface.co/docs/api-inference/index). This project shows how to create an interactive chatbot using these tools. | |
## Prerequisites | |
- Python 3.6 | |
## Facilities | |
### 1. Python install | |
Make sure Python is installed. | |
1. Go to the official Python website: [https://www.python.org/downloads/](https://www.python.org/downloads/) | |
2. Verify the installation with the command: | |
```sh | |
python --version | |
``` | |
### 2. Install dependencies | |
Install : | |
```sh | |
python -m venv .venv | |
source .venv/bin/activate | |
pip install -r requirements.txt | |
``` | |
### 4. Generate Access Token on Hugging Face | |
Go to your Hugging Face profile to generate your access token: [https://huggingface.co/settings/tokens](https://huggingface.co/settings/tokens) | |
### 5. Create and configure the `.env` File | |
1. Create the `.env` file: | |
```sh | |
echo HFTOKEN="your_token_here" > .env | |
``` | |
2. Add the token you created earlier to your `.env` file. | |
### 6. Launch the application | |
Run the following command to start Gaia Chat: | |
```sh | |
python app.py | |
``` | |
Once the application is launched, open your browser and navigate to the URL given in the terminal to interact with the chatbot. |