peter szemraj commited on
Commit
63bb54c
1 Parent(s): 91e513f

:construction: minor robustness things

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -31,7 +31,7 @@ import nltk
31
  from utils import (
32
  remove_repeated_words,
33
  remove_trailing_punctuation,
34
- remove_string_extras,
35
  corr,
36
  )
37
 
@@ -73,7 +73,7 @@ def ask_gpt(message: str):
73
  [str]: [model response as a string]
74
  """
75
  st = time.perf_counter()
76
- prompt = clean(message) # clean user input
77
  prompt = prompt.strip() # get rid of any extra whitespace
78
  if len(prompt) > 200:
79
  prompt = prompt[-200:] # truncate
 
31
  from utils import (
32
  remove_repeated_words,
33
  remove_trailing_punctuation,
34
+ cleantxt_wrap,
35
  corr,
36
  )
37
 
 
73
  [str]: [model response as a string]
74
  """
75
  st = time.perf_counter()
76
+ prompt = cleantxt_wrap(message) # clean user input
77
  prompt = prompt.strip() # get rid of any extra whitespace
78
  if len(prompt) > 200:
79
  prompt = prompt[-200:] # truncate