Skip to content

Latest commit

 

History

History
54 lines (40 loc) · 1.13 KB

runpod.md

File metadata and controls

54 lines (40 loc) · 1.13 KB

Runpod Testing

Create and activate Python venv

python3 -m venv venv
source venv/bin/activate

Install Requirements

pip install -r requirements.txt

Add Runpod credentials to .env

Copy the .env.example file to '.env' in the tests directory as follows:

cd tests
cp .env.example .env

Edit the .env file and add your RunPod API key to RUNPOD_API_KEY and your endpoint ID to RUNPOD_ENDPOINT_ID. Without these credentials, the tests will attempt to run locally instead of on RunPod.

Run test scripts

Once the venv is created and activated, the requirements installed, and the credentials added to the .env file, you can run a script, for example:

python all_1_source_into_all_1_target.py

This will display the HTTP status code and the filename of the output image, for example:

Status code: 200
Saving image: 792a7e9f-9c36-4d35-b408-0d45d8e2bbcb.jpg

You can then open the output image (in this case 792a7e9f-9c36-4d35-b408-0d45d8e2bbcb.jpg) to view the results of the face swap.

You obviously need to edit the payload within the script to achieve the desired results.