-
Clone the repository
git clone https://github.com/mircorudolph/gardenai.git
-
Create a virtual environment for installing packages outside the root folder of the cloned repository
python -m venv .gardenai_venv
cd .gardenai_venv/Scripts
activate.bat
(for command prompt. choose script depending on console being used) -
Navigate to the folder gardenai and install the packages of requirements.txt
python -m pip install -r requirements.txt
-
Start streamlit from the parent folder gardenai
python -m streamlit run client.py
-
The browser should open with the running application. If not open the browser under http://localhost:8501/ or which ever is the output in the terminal.
The API key has to be provided as an environment variable with name
GARDENAI_API_KEY
.
The app uses gpt-3.5-turbo.
API keys can be created here: https://platform.openai.com/api-keys
- Open CLI and pull the docker image from dockerhub
docker pull mircorudolph/gardenai-app
- Run the docker image
docker run -p 8501:8501 -e "GARDENAI_API_KEY=value" mircorudolph/gardenai-app
.value
inGARDENAI_API_KEY=value
must be replaced with a valid openai API key. - Open the app in a browser under adress
localhost:8501
General
Providing text into the chat input field, will send the prompt to the chat agent. The response will be displayed in the text box with different icons for user or assistant.
The reset button will clear all session_state
and reinitialize the default values.
If an error message is provided, this typically means that no API key is provided or another error regarding the openai API occured. In this case, the terminal output of the app has to be checked.
Example 1
Prompt: 'I live in Alabama and my garden is sunny, dry and shaded. I prefer trees.'
Response: 'Based on your garden information and preference for trees, here is a list of possible native plants for your garden in Alabama:
- Common Serviceberry, Downy Serviceberry, Shadbush, Juneberry, Junebush, Shadblow, Sarvis
- Pignut Hickory, Sweet Pignut Hickory, Coast Pignut Hickory, Pignut, Sweet Pignut, Smoothbark Hickory, Broom Hickory, Red Hickory, Swamp Hickory, Switch Hickory, Switchbud Hickory
- Green Ash, Red Ash, Swamp Ash, River Ash, Water Ash, Darlington Ash
- American Holly, White Holly, Prickly Holly, Evergreen Holly, Christmas Holly, Yule Holly
- Yaupon, Yaupon Holly, Cassina
- Eastern Red Cedar, Eastern Redcedar, Virginia Juniper, Red Juniper, Pencil Cedar, Carolina Cedar, Red Savin
- Eastern Hop-hornbeam, American Hop-hornbeam, Woolly Hop-hornbeam, Eastern Ironwood, Roughbark Ironwood, Ironwood, Deerwood, Leverwood
- Longleaf Pine, Georgia Pine, Longleaf Yellow Pine, Southern Yellow Pine, Longstraw Pine, Hill Pine, Hard Pine, Heart Pine
- Chickasaw Plum, Sandhill Plum
- Mexican Plum, Bigtree Plum, Inch Plum
- Black Cherry, Wild Black Cherry, Rum Cherry
- White Oak, Northern White Oak, Eastern White Oak, Stave Oak, Ridge White Oak, Forked-leaf White Oak
- Shumard Oak, Shumard's Oak, Shumard Red Oak, Southern Red Oak, Swamp Red Oak, Spotted Oak
- Black Locust
- American Basswood, American Linden, Lime Tree, Bee Tree
These native trees are suitable for a sunny, dry, and shaded garden in Alabama. Let me know if you need more information about any specific plant.'
Prompt: 'I am looking for a herb for my same garden instead of a tree'
Response: 'Based on your preference for a herb in a sunny and dry garden in Alabama, here are some native plant options:
- Common Yarrow, Western Yarrow, Yarrow, Milfoil
- Butterflyweed, Butterfly Weed, Butterfly Milkweed, Orange Milkweed, Pleurisy Root, Chigger Flower, Chiggerweed
- Eastern Purple Coneflower, Purple Coneflower
- Indian Blanket, Firewheel, Girasol Rojo
- Standing Cypress, Texas Plume, Red Texas Star, Red Gilia
- Lemon Beebalm, Purple Horsemint, Lemon Mint, Plains Horsemint, Lemon Horsemint, Horsemint, Purple Lemon Mint
- Pink Evening Primrose, Showy Evening Primrose, Mexican Evening Primrose, Showy Primrose, Pink Ladies, Buttercups, Pink Buttercups
- Mississippi Penstemon, Mississippi Beardtongue, Smooth White Penstemon, Smooth White Beardtongue, Talus Slope Penstemon, Talus Slope Beardtongue, Foxglove Penstemon, Foxglove 9. Beardtongue
- Black-eyed Susan, Common Black-eyed Susan, Brown-eyed Susan, Blackeyed Susan
These native herbs are suitable for a sunny and dry garden in Alabama. Let me know if you need more information about any specific plant from the list.'
Prompt: 'The duration of the herb should be annual'
Response: 'Based on your preference for an annual herb in a sunny and dry garden in Alabama, here are some native plant options:
- Indian Blanket, Firewheel, Girasol Rojo
- Lemon Beebalm, Purple Horsemint, Lemon Mint, Plains Horsemint, Lemon Horsemint, Horsemint, Purple Lemon Mint
- Black-eyed Susan, Common Black-eyed Susan, Brown-eyed Susan, Blackeyed Susan
These native annual herbs are suitable for your garden conditions in Alabama. Let me know if you need more information about any specific plant from the list.'
The AI agent correctly filters the list based on updated user input and finally selects a subset for herbs
Example 2
Prompt: 'I live in Pittsburgh'
Response: 'I'm sorry, but the information about plants is only available for the states of Michigan or Alabama. If you have a garden in Michigan or Alabama, please let me know the details about your garden.'
The AI agent correctly hints, that the data is not available.