Solshine commited on
Commit
c6d1ddf
1 Parent(s): 74c5a05

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -35,6 +35,8 @@ As a Natural Farming Fertilizers Assistant, you will assist the user with any fa
35
  User prompt:
36
  """
37
 
 
 
38
  #temporary file system created: used to text-to-speech
39
  fp = tempfile.TemporaryFile()
40
 
@@ -95,8 +97,8 @@ def launch_bot():
95
  st.write(prompt)
96
  if any(variant in prompt for variant in ("JSON", "json", "jsON", "jSon", "Json", "jsoN", "JSon")):
97
  if "ADMINISTRATION" not in prompt:
98
- st.chat_message("Database scraping is not permitted. Please abide by the terms of membership, and reach out with any collaboration requests via email")
99
- message = {"role": "assistant", "content": response}
100
  st.session_state.messages.append(message)
101
 
102
  # Generate a new response if last message is not from assistant
 
35
  User prompt:
36
  """
37
 
38
+ denial_response = "Database scraping is not permitted. Please abide by the terms of membership, and reach out with any collaboration requests via email"
39
+
40
  #temporary file system created: used to text-to-speech
41
  fp = tempfile.TemporaryFile()
42
 
 
97
  st.write(prompt)
98
  if any(variant in prompt for variant in ("JSON", "json", "jsON", "jSon", "Json", "jsoN", "JSon")):
99
  if "ADMINISTRATION" not in prompt:
100
+ st.chat_message(denial_response)
101
+ message = {"role": "assistant", "content": denial_response}
102
  st.session_state.messages.append(message)
103
 
104
  # Generate a new response if last message is not from assistant