danidanidani commited on
Commit
003d8ec
·
1 Parent(s): 5eec335

Update src/backend/chatbot.py

Browse files
Files changed (1) hide show
  1. src/backend/chatbot.py +5 -1
src/backend/chatbot.py CHANGED
@@ -24,9 +24,10 @@ from llama_index.llms.llama_utils import (
24
  # model = 'openai'
25
  model = 'Llama2-7B_CPP'
26
 
 
27
  # initialize model
28
  if model == 'Llama2-7B_CPP':
29
- model_path = "src/models/llama-2-7b-chat.Q4_K_M.gguf"
30
  llm = LlamaCPP(
31
  # You can pass in the URL to a GGML model to download it automatically
32
  #model_url=model_url,
@@ -227,6 +228,9 @@ def get_compatibility_matrix_2(plant_list):
227
  # get plant groupings from LLM
228
  def get_seed_groupings_from_LLM():
229
  plant_groupings_evaluated = "no response yet"
 
 
 
230
  template="You are a helpful assistant that only outputs python lists of lists of lists of plants."
231
  # make sure output is strictly and only a list of lists for one grouping
232
  text ='''I am working on a gardening project and need to optimally group a set of plants based on their compatibility. Below is the compatibility matrix for the plants, where each value represents how well two plants grow together (positive values indicate good compatibility, negative values indicate poor compatibility). I also have specific constraints for planting: there are a certain number of plant beds (n_plant_beds), each bed can have a minimum of min_species species and a maximum of max_species species. Given these constraints, please suggest several groupings of these plants into n_plant_beds beds, optimizing for overall compatibility.
 
24
  # model = 'openai'
25
  model = 'Llama2-7B_CPP'
26
 
27
+
28
  # initialize model
29
  if model == 'Llama2-7B_CPP':
30
+ model_path = "/Users/dheym/Library/CloudStorage/OneDrive-Personal/Documents/side_projects/GRDN/src/models/llama-2-7b-chat.Q4_K_M.gguf"
31
  llm = LlamaCPP(
32
  # You can pass in the URL to a GGML model to download it automatically
33
  #model_url=model_url,
 
228
  # get plant groupings from LLM
229
  def get_seed_groupings_from_LLM():
230
  plant_groupings_evaluated = "no response yet"
231
+ if st.session_state.demo_lite:
232
+ # just return "no response yet" for now
233
+ return plant_groupings_evaluated
234
  template="You are a helpful assistant that only outputs python lists of lists of lists of plants."
235
  # make sure output is strictly and only a list of lists for one grouping
236
  text ='''I am working on a gardening project and need to optimally group a set of plants based on their compatibility. Below is the compatibility matrix for the plants, where each value represents how well two plants grow together (positive values indicate good compatibility, negative values indicate poor compatibility). I also have specific constraints for planting: there are a certain number of plant beds (n_plant_beds), each bed can have a minimum of min_species species and a maximum of max_species species. Given these constraints, please suggest several groupings of these plants into n_plant_beds beds, optimizing for overall compatibility.