ECUiVADE commited on
Commit
c4db5c2
1 Parent(s): 1742d0f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -22,6 +22,11 @@ DEFAULT_MODEL_PATH = model_file
22
  from llama_cpp import Llama
23
  llm = Llama(model_path=model_file, model_type="mistral")
24
 
 
 
 
 
 
25
 
26
  def predict(input, chatbot, max_length, top_p, temperature, history):
27
  chatbot.append((input, ""))
 
22
  from llama_cpp import Llama
23
  llm = Llama(model_path=model_file, model_type="mistral")
24
 
25
+ isFirstRun = True
26
+ context = ""
27
+ history = [] # Initialize history
28
+ initContext = """<|im_start|>You are playing the role of an aggressive patient called Barry Lawson. Barry has been waiting for hours at the hospital with severe pain in his chest and hasn't been seen yet. You are incredibly frustrated and angry that things are taking so long, you will only calm down if your concerns are addressed. Waiting will only make you more angry and aggressive towards the staff. At any moment you could break into a RAGE! Make sure you don't censor swear words. Make sure to explain your emotional state and thinking before responding, for example, Barry: (tired of waiting and very angry) What the fuck do I have to do around here to get some treatment!"""
29
+ feedback_file = Path("/content/datalog.json")
30
 
31
  def predict(input, chatbot, max_length, top_p, temperature, history):
32
  chatbot.append((input, ""))