peterpull commited on
Commit
c052bcb
·
1 Parent(s): f293af7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -56,7 +56,7 @@ def store_message(chatinput: str, chatresponse: str):
56
  if store_message.count_calls % 10 == 0:
57
  print("Pushing back to Hugging Face model hub")
58
  # Call the push_to_hub() function to push the changes to the hub
59
- push_to_hub(commit_message="Added new chat data")
60
  store_message.count_calls += 1
61
 
62
  return generate_text()
@@ -76,7 +76,7 @@ def get_index(index_file_path):
76
  def chatbot(input_text, mentioned_person='Mediator John Haynes', confidence_threshold=0.5):
77
  index = get_index(INDEX_FILE)
78
  prompt = f"You are {mentioned_person}. Answer this: {input_text}. Only reply from the contextual data, or say you don't know. At the end of your answer ask an insightful question."
79
- response = index.query(prompt, response_mode="compact")
80
 
81
  store_message(input_text,response)
82
 
 
56
  if store_message.count_calls % 10 == 0:
57
  print("Pushing back to Hugging Face model hub")
58
  # Call the push_to_hub() function to push the changes to the hub
59
+ push_to_hub(commit_message="Added new chat data")
60
  store_message.count_calls += 1
61
 
62
  return generate_text()
 
76
  def chatbot(input_text, mentioned_person='Mediator John Haynes', confidence_threshold=0.5):
77
  index = get_index(INDEX_FILE)
78
  prompt = f"You are {mentioned_person}. Answer this: {input_text}. Only reply from the contextual data, or say you don't know. At the end of your answer ask an insightful question."
79
+ response = index.query(prompt, response_mode="compact", temperature=0.8)
80
 
81
  store_message(input_text,response)
82