Archi Back
Back-end part for the Archi project.
Installation
First, download this repository and unzip it to the folder of your choice.
If you have Git client, you can also use the following command:
git clone https://gitlab.imt-atlantique.fr/FIL-A3-2024/ue-proj/archi-back.git
You will have to download Python here and install it on your computer.
Note: if the installer asks you to install pip package manager, say yes or check the box.
Then, use the included scripts to install Archi Back:
-
On Windows, launch
setup.bat
. -
On Linux/macOS, open a terminal inside the directory of the project then write
chmod +x ./setup.sh && ./setup.sh
Configuration
The back-end part send requests to the HuggingFace API.
Follow these steps to connect your account to the back-end:
- Visit this page to create a new token (give it a name).
- When your token is created, you should see its value. Copy the value in
.env
file (replacehf_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
with your token, make sure to keephf_token=
before!) - Your back-end should now be linked to your HuggingFace account.
Usage
First, you should launch the back-end part:
-
On Windows, launch
run.bat
. -
On Linux/macOS, open a terminal inside the directory of the project then write
chmod +x ./run.sh && ./run.sh
Then, launch the front-end part with the instructions available here.
Google Drive integration (optional)
If you want your results to be uploaded on Google Drive, you should configure a Google service account and a Google Drive folder shared with this account so it can upload your artworks.
Follow these steps (as Google Cloud Console is dense, you can click link for each step):
- Visit Google Cloud Console.
- Create a new project and give it a name.
- Enable Google Drive API for your project.
- Create a service account for your project and just give it a name (copy its email and keep it in a notepad before clicking "OK").
- Click on the newly created account inside the list, click on "Keys" tab, then on "Add key" button and "Create key". Check that "JSON" is selected and click "OK".
- Your key should have been downloaded. Rename it to "service_account.json".
- Copy the key inside the root folder of the project (archi-back).
- Create a new folder into Google Drive.
- Share this folder with the email of your service account (step 4, you can also find it here) with "Editor" permission level.
- Report the identifier of your Google Drive folder in
.env
file afterdrive_folder_id=
. - Your back-end should now be linked to your Google Drive account.
Authors
Renaud Birk and Anas Yakoubov
License
This project is licensed under GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007.