|
# Clone this repo |
|
git clone https://github.com/eaedk/friendly_web_interface_for_ML_models.git |
|
|
|
# Setup virtual environment |
|
|
|
## One-line Setup |
|
### Windows |
|
python3 -m venv venv; venv\Scripts\activate; python -m pip install --upgrade pip; python -m pip install -qr requirements.txt |
|
### Linux |
|
python3 -m venv venv; source venv/bin/activate; python -m pip install --upgrade pip; python -m pip install -qr requirements.txt |
|
|
|
## ManualSetup |
|
### Create the venv |
|
python3 -m venv venv |
|
|
|
### Activate the venv |
|
source venv/bin/activate #this line will work in linux |
|
venv\Scripts\activate # this it the code for windows. |
|
|
|
### Deactivate the venv # to deactivate the venv later |
|
deactivate |
|
|
|
|
|
### Install required packages |
|
python -m pip install --upgrade pip # update pip first before to use it, to avoid warning |
|
python -m pip install -qr requirements.txt |
|
|
|
|
|
# Normal app execution |
|
## Gradio |
|
python gradio_project/basic_demo/app.py |
|
|
|
# Streamlit |
|
streamlit run streamlit_project/basic_demo/app.py |
|
|
|
# Run tests |
|
python -m pytest -v |
|
|
|
# Freeze packages' version |
|
pip3 freeze > requirements_v.txt |