Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Commit
•
c1bdfcc
1
Parent(s):
849dc1e
Update text_converter.py
Browse files- text_converter.py +4 -1
text_converter.py
CHANGED
@@ -107,13 +107,16 @@ def generate_similar_sentence(input_text, min_reading_level, max_reading_level,
|
|
107 |
|
108 |
# Printing all generated texts to the console.
|
109 |
for index, text in enumerate(generated_texts):
|
110 |
-
print(f"
|
|
|
111 |
|
112 |
# Printing the selected index and text.
|
|
|
113 |
print(f"Selected Iteration: {result_index + 1}")
|
114 |
print(f"Selected Result: {generated_texts[result_index]}")
|
115 |
print(f"Selected Result's Similarity score: {generated_text_scores[result_index][0]}")
|
116 |
print(f"Selected Result's Readability score: {generated_text_scores[result_index][1]}")
|
|
|
117 |
|
118 |
# Returning the final result.
|
119 |
if completed:
|
|
|
107 |
|
108 |
# Printing all generated texts to the console.
|
109 |
for index, text in enumerate(generated_texts):
|
110 |
+
print(f"=============== Iteration {index} ===============")
|
111 |
+
print(f"Generated text: {text}\nSimilarity: {generated_text_scores[index][0]}\nReadability Score: {generated_text_scores[index][1]}\n")
|
112 |
|
113 |
# Printing the selected index and text.
|
114 |
+
print(f"=============== Start Printing Selected Information ===============")
|
115 |
print(f"Selected Iteration: {result_index + 1}")
|
116 |
print(f"Selected Result: {generated_texts[result_index]}")
|
117 |
print(f"Selected Result's Similarity score: {generated_text_scores[result_index][0]}")
|
118 |
print(f"Selected Result's Readability score: {generated_text_scores[result_index][1]}")
|
119 |
+
print(f"=============== End Printing Selected Information ===============")
|
120 |
|
121 |
# Returning the final result.
|
122 |
if completed:
|