danidanidani commited on
Commit
5eec335
1 Parent(s): 2b270fd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -9
app.py CHANGED
@@ -24,7 +24,8 @@ st.session_state.raw_plant_compatibility = st.session_state.raw_plant_compatibil
24
  # get list of plants
25
  st.session_state.plant_list = st.session_state.raw_plant_compatibility.index.tolist()
26
 
27
-
 
28
 
29
  # setup keys and api info
30
  # OPENAI_API_KEY = st.secrets["OPENAI_API_KEY"]
@@ -294,9 +295,9 @@ if page == "Garden Optimization":
294
  st.write("These parameters control the behavior of the genetic algorithm.")
295
 
296
  # Genetic Algorithm parameters
297
- st.session_state.population_size = st.slider("Population Size", min_value=400, max_value=1000, value=500,
298
  help="The number of individuals in each generation of the genetic algorithm.")
299
- st.session_state.num_generations = st.slider("Number of Generations", min_value=400, max_value=1000, value=450,
300
  help="The total number of generations to evolve through.")
301
  st.session_state.tournament_size = st.slider("Tournament Size", min_value=5, max_value=20, value=10,
302
  help="The number of individuals competing in each tournament selection round.")
@@ -339,10 +340,13 @@ if page == "Garden Optimization":
339
  st.header("Plant care tips")
340
  with st.spinner('generating plant care tips...'):
341
  st.write("Here are some plant care tips for your plants. Good luck!")
342
- #if 'plant_care_tips' not in st.session_state:
343
- st.session_state.plant_care_tips = get_plant_care_tips(st.session_state.input_plants_raw)
344
- styled_text = f'<div style="background-color: #2d5a59; color: white; padding: 10px; border-radius: 5px;">{st.session_state.plant_care_tips}</div>'
345
- st.write(styled_text, unsafe_allow_html=True)
 
 
 
346
 
347
 
348
 
@@ -375,10 +379,13 @@ if page == "About":
375
  - langchain
376
  - streamlit_chat
377
  - github copilot
 
 
 
378
  - chatGPT
379
  - GPT family of models
380
  - DALL·E 3 (in preprocessing script for image generation)
381
  """)
382
- st.write("Data sources in addition to what GPT was trained on: \n https://waldenlabs.com/the-ultimate-companion-planting-guide-chart/ ")
383
 
384
- st.write("avatars from: https://www.flaticon.com/free-icons/bot")
 
24
  # get list of plants
25
  st.session_state.plant_list = st.session_state.raw_plant_compatibility.index.tolist()
26
 
27
+ # set version
28
+ st.session_state.demo_lite = False
29
 
30
  # setup keys and api info
31
  # OPENAI_API_KEY = st.secrets["OPENAI_API_KEY"]
 
295
  st.write("These parameters control the behavior of the genetic algorithm.")
296
 
297
  # Genetic Algorithm parameters
298
+ st.session_state.population_size = st.slider("Population Size", min_value=100, max_value=1000, value=500,
299
  help="The number of individuals in each generation of the genetic algorithm.")
300
+ st.session_state.num_generations = st.slider("Number of Generations", min_value=100, max_value=1000, value=450,
301
  help="The total number of generations to evolve through.")
302
  st.session_state.tournament_size = st.slider("Tournament Size", min_value=5, max_value=20, value=10,
303
  help="The number of individuals competing in each tournament selection round.")
 
340
  st.header("Plant care tips")
341
  with st.spinner('generating plant care tips...'):
342
  st.write("Here are some plant care tips for your plants. Good luck!")
343
+ if st.session_state.demo_lite:
344
+ st.session_state.plant_care_tips = "Plant care tips are not available in this lite demo version but will be available in the future! Only the local version of this app has full functionality at this time."
345
+ else:
346
+ #if 'plant_care_tips' not in st.session_state:
347
+ st.session_state.plant_care_tips = get_plant_care_tips(st.session_state.input_plants_raw)
348
+ styled_text = f'<div style="background-color: #2d5a59; color: white; padding: 10px; border-radius: 5px;">{st.session_state.plant_care_tips}</div>'
349
+ st.write(styled_text, unsafe_allow_html=True)
350
 
351
 
352
 
 
379
  - langchain
380
  - streamlit_chat
381
  - github copilot
382
+ - Llama2
383
+ - HuggingFace
384
+ - LlamaIndex
385
  - chatGPT
386
  - GPT family of models
387
  - DALL·E 3 (in preprocessing script for image generation)
388
  """)
389
+ st.write("Data sources in addition to what LLMs were trained on: \n https://waldenlabs.com/the-ultimate-companion-planting-guide-chart/ ")
390
 
391
+ #st.write("avatars from: https://www.flaticon.com/free-icons/bot")