- Open the desired IDE or notebook and create a new Python virtual environment.
- Download and install PYTORCH and CUDA versions compatible with the system in the environment.
!pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
- Import torch and check whether CUDA detects the device's GPU.
torch.cuda.is_available()
print(torch.cuda.get_device_name(0))
- Install ULTRALYTICS and run the code to train the model and test the model.
FOR DEPLOYING AND RUNNING THE WEB APP –
- Install the necessary packages from requirements.txt.
%pip install requirements.txt.
- Create a file named [NAME].py and write the code to deploy the web app.
- Run the Streamlit web app.
- The web app can be deployed in Streamlit cloud service by uploading the code in the GitHub
repository.