Try this
import openai
import pandas as pd
from tqdm import tqdm
df = pd.read_csv("input.csv")
# Set OpenAI API key
openai.api_key = "REPLACEAPIKEY"
results = []
errors = []
for index, row in tqdm(df.iterrows(), total=len(df)):
if not pd.isna(row['output']):
# Skip this row if...
I tried earlier versions but there were issues so I improved this one, This way you wont loose any content ,The script saves the generated text to the results list as soon as it receives it from the OpenAI API. This means that the generated text is being saved while the script is running and...
I'd like to thank @dantedante for the review oppurtunity . Fast communication, explained to me how things are gonna work out whole process etc , asked me for link and 3 keywords . Once i gave himw hat he asked for within a few hours service was delivred and I was also provided after and before...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.