Spaces:
Sleeping
Sleeping
HakshaySundar
commited on
Commit
•
c11817c
1
Parent(s):
c97edc1
Update text_converter.py
Browse filesbugfix with name of variable
- text_converter.py +4 -4
text_converter.py
CHANGED
@@ -109,11 +109,11 @@ def generate_similar_sentence(input_text, min_reading_level, max_reading_level,
|
|
109 |
# Printing the selected index and text.
|
110 |
print(f"Selected Iteration: {result_index + 1}")
|
111 |
print(f"Selected Result: {generated_texts[result_index]}")
|
112 |
-
print(f"Selected Result's Similarity score: {
|
113 |
-
print(f"Selected Result's Readability score: {
|
114 |
|
115 |
# Returning the final result.
|
116 |
if completed:
|
117 |
-
return generated_texts[result_index],
|
118 |
else:
|
119 |
-
return generated_texts[result_index],
|
|
|
109 |
# Printing the selected index and text.
|
110 |
print(f"Selected Iteration: {result_index + 1}")
|
111 |
print(f"Selected Result: {generated_texts[result_index]}")
|
112 |
+
print(f"Selected Result's Similarity score: {generated_text_scores[result_index][0]}")
|
113 |
+
print(f"Selected Result's Readability score: {generated_text_scores[result_index][1]}")
|
114 |
|
115 |
# Returning the final result.
|
116 |
if completed:
|
117 |
+
return generated_texts[result_index], generated_text_scores[result_index][0], generated_text_complexities[result_index][1], "Success! Please see the converted text at your target reading level."
|
118 |
else:
|
119 |
+
return generated_texts[result_index], generated_text_scores[result_index][0], generated_text_complexities[result_index][1], "Failed. We could not reach the target reading level while maintaining the text meaning."
|