You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I used the following code to generate the augmented paraphrased sentences. After the last model's output changed to NoneType. Although I am iterating over my question lists, it outputs None. I am not sure about it and could not find any issues.
import time
ts = time.time()
augmented_questions = []
for question in finance_list:
para_phrases = parrot.augment(input_phrase=question.lower(), use_gpu=False)
print(f"Length of para phrased by model are: {len(para_phrases)}")
for aug in para_phrases:
print(f"Printing aug in this: {aug}")
augmented_questions.append(aug)
print(f"Appended the {aug} with type {type(aug)}")
te = time.time()
print(len(augmented_questions))
print(f"time taken to augment " + str(len(questions)) + " is "+ str(te-ts) + " seconds ")
ChatGPT suggested to add the line of code for checking the NoneType in output (line 7 below). Anyone has information why I am getting this NoneType error from model output?
import time
ts = time.time()
augmented_questions = []
#19 thy without .lower()
for question in finance_list:
para_phrases = parrot.augment(input_phrase=question.lower(), use_gpu=False)
if para_phrases is not None:
print(f"Length of para phrased by model are: {len(para_phrases)}")
for aug in para_phrases:
print(f"Printing aug in this: {aug}")
augmented_questions.append(aug)
print(f"Appended the {aug} with type {type(aug)}")
te = time.time()
print(len(augmented_questions))
print(f"time taken to augment " + str(len(questions)) + " is "+ str(te-ts) + " seconds ")
The text was updated successfully, but these errors were encountered:
I used the following code to generate the augmented paraphrased sentences. After the last model's output changed to NoneType. Although I am iterating over my question lists, it outputs None. I am not sure about it and could not find any issues.
ChatGPT suggested to add the line of code for checking the NoneType in output (line 7 below). Anyone has information why I am getting this NoneType error from model output?
The text was updated successfully, but these errors were encountered: