lukestanley commited on
Commit
c995e6d
·
1 Parent(s): 58dcbdf

Clarify setup comments, remove unused global, increase max iterations

Browse files
Files changed (1) hide show
  1. chill.py +4 -4
chill.py CHANGED
@@ -13,7 +13,9 @@ from promptObjects import (
13
  SpicyScore,
14
  )
15
 
16
- # This script uses the llama_cpp server to improve a text, it depends on the llama_cpp server being installed and running with a model loaded.
 
 
17
  # pip install llama-cpp-python[server] --upgrade
18
  # python3 -m llama_cpp.server --model mixtral-8x7b-instruct-v0.1.Q4_K_M.gguf --port 5834 --n_ctx 4096 --use_mlock false
19
  # Run this script:
@@ -40,7 +42,6 @@ global suggestions
40
  suggestions = []
41
  last_edit = ""
42
  start_time = time.time()
43
- max_iterations = 4
44
 
45
 
46
  def improve_text_attempt():
@@ -116,11 +117,10 @@ def improvement_loop(input_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 = 4
124
  original_text = input_text
125
 
126
  for iteration in range(1, max_iterations + 1):
 
13
  SpicyScore,
14
  )
15
 
16
+ # This script uses the large language model to improve a text, it depends on a llama_cpp server being setup with a model loaded.
17
+ # There are several different interfaces it can use, see utils.py for more details.
18
+ # Here is a bit of a local setup example:
19
  # pip install llama-cpp-python[server] --upgrade
20
  # python3 -m llama_cpp.server --model mixtral-8x7b-instruct-v0.1.Q4_K_M.gguf --port 5834 --n_ctx 4096 --use_mlock false
21
  # Run this script:
 
42
  suggestions = []
43
  last_edit = ""
44
  start_time = time.time()
 
45
 
46
 
47
  def improve_text_attempt():
 
117
  global last_edit
118
  global suggestions
119
  global start_time
 
120
  suggestions = []
121
  last_edit = ""
122
  start_time = time.time()
123
+ max_iterations = 6
124
  original_text = input_text
125
 
126
  for iteration in range(1, max_iterations + 1):