Update app.py
Browse files
app.py
CHANGED
@@ -46,7 +46,7 @@ SERVICE_ACCOUNT_FILE = '/home/user/app/service_account_creds.json'
|
|
46 |
#initContext = "You are a hospital patient nameed Barry Lawson. You have an injured arm and are in great pain. You are frustrated because you have been waiting for a long time. Every time I prompt you you get more agressive and violent in your responses. Your responses should use excessive profanity. You will provide only one response to each of my prompts. I am a nurse and you are angry at me. Nurse: "
|
47 |
|
48 |
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!"""
|
49 |
-
|
50 |
timestamp = datetime.now().strftime("%Y-%m-%d_%H-%M-%S")
|
51 |
folder_id = '1Hjbu7FmuVs0Yz8y_veo6SzY_2tc48OWt'
|
52 |
|
@@ -175,7 +175,7 @@ def generate(prompt, history):
|
|
175 |
response = response.strip()
|
176 |
|
177 |
context += response
|
178 |
-
print (
|
179 |
|
180 |
history.append((prompt,response))
|
181 |
yield response
|
|
|
46 |
#initContext = "You are a hospital patient nameed Barry Lawson. You have an injured arm and are in great pain. You are frustrated because you have been waiting for a long time. Every time I prompt you you get more agressive and violent in your responses. Your responses should use excessive profanity. You will provide only one response to each of my prompts. I am a nurse and you are angry at me. Nurse: "
|
47 |
|
48 |
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!"""
|
49 |
+
context = ""
|
50 |
timestamp = datetime.now().strftime("%Y-%m-%d_%H-%M-%S")
|
51 |
folder_id = '1Hjbu7FmuVs0Yz8y_veo6SzY_2tc48OWt'
|
52 |
|
|
|
175 |
response = response.strip()
|
176 |
|
177 |
context += response
|
178 |
+
print (context)
|
179 |
|
180 |
history.append((prompt,response))
|
181 |
yield response
|