lukestanley commited on
Commit
f932ac0
1 Parent(s): 139217d

Removes unused line and tidying

Browse files
Files changed (1) hide show
  1. chill.py +5 -5
chill.py CHANGED
@@ -21,7 +21,7 @@ from promptObjects import (
21
  # python3 -m llama_cpp.server --model mixtral-8x7b-instruct-v0.1.Q4_K_M.gguf --port 5834 --n_ctx 4096 --use_mlock false
22
  # Run this script:
23
  # python3 chill.py
24
- # This will then try and improve the text below:
25
 
26
  original_text = """Stop chasing dreams instead. Life is not a Hollywood movie. Not everyone is going to get a famous billionaire. Adjust your expectations to reality, and stop thinking so highly of yourself, stop judging others. Assume the responsibility for the things that happen in your life. It is kind of annoying to read your text, it is always some external thing that "happened" to you, and it is always other people who are not up to your standards. At some moment you even declare with despair. And guess what? This is true and false at the same time, in a fundamental level most people are not remarkable, and you probably aren't too. But at the same time, nobody is the same, you have worth just by being, and other people have too. The impression I get is that you must be someone incredibly annoying to work with, and that your performance is not even nearly close to what you think it is, and that you really need to come down to earth. Stop looking outside, work on yourself instead. You'll never be satisfied just by changing jobs. Do therapy if you wish, become acquainted with stoicism, be a volunteer in some poor country, whatever, but do something to regain control of your life, to get some perspective, and to adjust your expectations to reality."""
27
  # From elzbardico on https://news.ycombinator.com/item?id=36119858
@@ -51,7 +51,6 @@ def improve_text():
51
  "previous_suggestions": json.dumps(suggestions, indent=2),
52
  }
53
  resp_json = query_ai_prompt(improve_prompt, replacements, ImprovedText)
54
- # print('resp_json', resp_json)
55
  return resp_json["text"]
56
 
57
 
@@ -134,8 +133,9 @@ for iteration in range(1, max_iterations + 1):
134
  print("ValueError:", e)
135
  continue
136
 
137
- # TODO: Segment the text into sentences
 
138
  """
139
- import pysbd
140
- sentences = pysbd.Segmenter(language="en", clean=False).segment(paragraph)
141
  """
 
21
  # python3 -m llama_cpp.server --model mixtral-8x7b-instruct-v0.1.Q4_K_M.gguf --port 5834 --n_ctx 4096 --use_mlock false
22
  # Run this script:
23
  # python3 chill.py
24
+ # This will then try and improve the original text below:
25
 
26
  original_text = """Stop chasing dreams instead. Life is not a Hollywood movie. Not everyone is going to get a famous billionaire. Adjust your expectations to reality, and stop thinking so highly of yourself, stop judging others. Assume the responsibility for the things that happen in your life. It is kind of annoying to read your text, it is always some external thing that "happened" to you, and it is always other people who are not up to your standards. At some moment you even declare with despair. And guess what? This is true and false at the same time, in a fundamental level most people are not remarkable, and you probably aren't too. But at the same time, nobody is the same, you have worth just by being, and other people have too. The impression I get is that you must be someone incredibly annoying to work with, and that your performance is not even nearly close to what you think it is, and that you really need to come down to earth. Stop looking outside, work on yourself instead. You'll never be satisfied just by changing jobs. Do therapy if you wish, become acquainted with stoicism, be a volunteer in some poor country, whatever, but do something to regain control of your life, to get some perspective, and to adjust your expectations to reality."""
27
  # From elzbardico on https://news.ycombinator.com/item?id=36119858
 
51
  "previous_suggestions": json.dumps(suggestions, indent=2),
52
  }
53
  resp_json = query_ai_prompt(improve_prompt, replacements, ImprovedText)
 
54
  return resp_json["text"]
55
 
56
 
 
133
  print("ValueError:", e)
134
  continue
135
 
136
+ # TODO: Segment the text into sentences for parallel processing,
137
+ # and isolate the most problematic parts for improvement
138
  """
139
+ # import pysbd
140
+ # sentences = pysbd.Segmenter(language="en", clean=False).segment(paragraph)
141
  """