A Simple Python Flask API to Interact with Azure Open AI
python app.py # On Windows
$env:FLASK_APP = "app"
$env:FLASK_ENV = "development"
flask run
pip install virtualenv
python.exe -m pip install --upgrade pip
python -m venv .venv
.venv/Scripts/activate
pip freeze
deactivate
pip install Flask python-dotenv openai
pip freeze > ./requirements.txt
pip install -r ./requirements.txt
- Create a new folder
- Create an .env file and Environment Variables
- Create a virtual environment
- Install
pip install Flask python-dotenv openai
and other dependencies- pip freeze > requirements.txt
- Create a
app.py
file