Spaces:
Sleeping
Sleeping
Luke Stanley
commited on
Commit
·
e30b729
1
Parent(s):
9475016
Initialise global variables in improvement_loop function
Browse files
chill.py
CHANGED
|
@@ -114,6 +114,13 @@ def print_iteration_result(iteration, overall_score, time_used):
|
|
| 114 |
def improvement_loop(input_text):
|
| 115 |
global original_text
|
| 116 |
global last_edit
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 117 |
original_text = input_text
|
| 118 |
|
| 119 |
for iteration in range(1, max_iterations + 1):
|
|
|
|
| 114 |
def improvement_loop(input_text):
|
| 115 |
global original_text
|
| 116 |
global last_edit
|
| 117 |
+
global suggestions
|
| 118 |
+
global start_time
|
| 119 |
+
global max_iterations
|
| 120 |
+
suggestions = []
|
| 121 |
+
last_edit = ""
|
| 122 |
+
start_time = time.time()
|
| 123 |
+
max_iterations = 20
|
| 124 |
original_text = input_text
|
| 125 |
|
| 126 |
for iteration in range(1, max_iterations + 1):
|