Commit
·
2cd32e1
1
Parent(s):
8ff2d7e
Improved Prompts
Browse files
run.py
CHANGED
@@ -13,9 +13,9 @@ def give(results):
|
|
13 |
if int(results.pred[0][-1][-1].numpy())==0:
|
14 |
prompt="Great focus. You are doing great!"
|
15 |
elif int(results.pred[0][-1][-1].numpy())==1:
|
16 |
-
prompt="
|
17 |
else:
|
18 |
-
prompt="
|
19 |
inputs = tokenizer(prompt, return_tensors="pt", return_attention_mask=False)
|
20 |
outputs = llm.generate(**inputs, max_length=30)
|
21 |
return tokenizer.batch_decode(outputs)[0]
|
|
|
13 |
if int(results.pred[0][-1][-1].numpy())==0:
|
14 |
prompt="Great focus. You are doing great!"
|
15 |
elif int(results.pred[0][-1][-1].numpy())==1:
|
16 |
+
prompt="Suggest an exercise for staying awake."
|
17 |
else:
|
18 |
+
prompt="Suggest an exercise for staying alert."
|
19 |
inputs = tokenizer(prompt, return_tensors="pt", return_attention_mask=False)
|
20 |
outputs = llm.generate(**inputs, max_length=30)
|
21 |
return tokenizer.batch_decode(outputs)[0]
|