beweinreich commited on
Commit
4aa61c6
1 Parent(s): e67cca8
Files changed (2) hide show
  1. audits/1718976967.csv +1 -0
  2. chatgpt_audit.py +3 -1
audits/1718976967.csv ADDED
@@ -0,0 +1 @@
 
 
1
+ input_word,original_dictionary_word,new_dictionary_word
chatgpt_audit.py CHANGED
@@ -115,6 +115,7 @@ for row in results:
115
  all_words = list(set(all_words)) # remove duplicates
116
  response = query_gpt(input_word, dictionary_word, all_words)
117
  if response:
 
118
  if response == dictionary_word and response in dictionary:
119
  print(f" - Mapping is correct")
120
  db_cursor.execute("UPDATE mappings SET reviewed = true WHERE input_word = %s", (input_word,))
@@ -141,7 +142,8 @@ for row in results:
141
  else:
142
  print(f" - Response {response} is not in the dictionary")
143
 
144
- csv_data.append(new_row) if new_row
 
145
  update_csv(csv_data)
146
 
147
  db_conn.close()
 
115
  all_words = list(set(all_words)) # remove duplicates
116
  response = query_gpt(input_word, dictionary_word, all_words)
117
  if response:
118
+ new_row = None
119
  if response == dictionary_word and response in dictionary:
120
  print(f" - Mapping is correct")
121
  db_cursor.execute("UPDATE mappings SET reviewed = true WHERE input_word = %s", (input_word,))
 
142
  else:
143
  print(f" - Response {response} is not in the dictionary")
144
 
145
+ if new_row:
146
+ csv_data.append(new_row)
147
  update_csv(csv_data)
148
 
149
  db_conn.close()