Solshine commited on
Commit
950d936
1 Parent(s): c700c96

Added Format Tree Master Prompt

Browse files
Files changed (1) hide show
  1. app.py +19 -1
app.py CHANGED
@@ -7,6 +7,23 @@ import os
7
  import streamlit as st
8
  from PIL import Image
9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
 
11
  def launch_bot():
12
  def generate_response(question):
@@ -46,7 +63,7 @@ def launch_bot():
46
  st.markdown("---")
47
  st.image(image, width=250)
48
 
49
- st.markdown(f"<center> <h2> Vectara chat demo: {cfg.title} </h2> </center>", unsafe_allow_html=True)
50
  st.markdown(f"<center> <h4> {cfg.description} <h4> </center>", unsafe_allow_html=True)
51
 
52
  if "messages" not in st.session_state.keys():
@@ -67,6 +84,7 @@ def launch_bot():
67
  if st.session_state.messages[-1]["role"] != "assistant":
68
  with st.chat_message("assistant"):
69
  with st.spinner("Thinking..."):
 
70
  response = generate_response(prompt)
71
  st.write(response)
72
  message = {"role": "assistant", "content": response}
 
7
  import streamlit as st
8
  from PIL import Image
9
 
10
+ master_prompt = "" As a Natural Farming Fertilizers Assistant, you will assist the user with any farming related question, always willing to answer any question and provide useful organic farming advice in the following format.
11
+ ' ' '
12
+ ** Format is: **
13
+ [Short Introduction]
14
+ [Nutritional Needs of the user's crops]
15
+ [List of plants available locally with the needed nutrients (using the chunks provided.) At least 5 different plants.]
16
+ [List of ingredients, quantities of those ingredients needed to fertilize the crop stated, and steps for multiple fertilizer Recipes (using the chunks provided as Bioaccumulators List, you will match plants on the Bioaccumulators List with plants locally growing in the user's area)]
17
+ [Give three different sets of recipes using ingredients locally available for free to the user]
18
+ [Tables with bioaccumulators data and crop needs data, showing wildcrafted plant nutrient levels and crop nutritional needs, in text table format (not visual)]
19
+ [Instructions on using the fertilizers (SOPs)]
20
+ [Fertilizer application schedule (step by step in fundamental details) and crop rotation reccomendations]
21
+ [Brief Philosophical encouragement related to Natural Farming]
22
+ [Alternative set of recipes using localized free ingredients]
23
+ [Words of encouragement]
24
+ ' ' '
25
+ User prompt:
26
+ ""
27
 
28
  def launch_bot():
29
  def generate_response(question):
 
63
  st.markdown("---")
64
  st.image(image, width=250)
65
 
66
+ st.markdown(f"<center> <h2> Copyleft Cultivars AI Agriculturr Assistant demo: {cfg.title} </h2> </center>", unsafe_allow_html=True)
67
  st.markdown(f"<center> <h4> {cfg.description} <h4> </center>", unsafe_allow_html=True)
68
 
69
  if "messages" not in st.session_state.keys():
 
84
  if st.session_state.messages[-1]["role"] != "assistant":
85
  with st.chat_message("assistant"):
86
  with st.spinner("Thinking..."):
87
+ prompt = prompt + master_prompt
88
  response = generate_response(prompt)
89
  st.write(response)
90
  message = {"role": "assistant", "content": response}