2b-agent / chatgpt_prompt_gen.py
dipta007's picture
added promt generation
cdfa356
raw
history blame contribute delete
No virus
809 Bytes
import pandas as pd
import pyperclip
df = pd.read_csv('./result_good-workers.csv')
prompt = '''
Here is a story about an event:
{story}
The goal of the story: {goal}
Condition: {condition}
Do you think this condition will lead to the goal of the story? Answer it in Yes or No.
'''
for index, row in df.iterrows():
story = row['Input.story']
goal = row['Answer.goal']
condition = row['Answer.condition']
not_condition = row['Answer.not_condition']
nprompt = prompt.format(story=story, goal=goal, condition=condition)
print(nprompt)
pyperclip.copy(nprompt)
input("Press Enter to for next not condition")
nprompt = prompt.format(story=story, goal=goal, condition=not_condition)
print(nprompt)
pyperclip.copy(nprompt)
input("Press Enter to for next story")