Michael Perkins commited on
Commit
8bb74c2
·
1 Parent(s): de7e343

tune postprocessing_

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -20,7 +20,7 @@ def postprocess_output(text):
20
  Postprocesses the generated text to handle SQL aggregate functions like AVG, COUNT, etc.,
21
  and SQL-like conditions such as 'price > 100'. It ensures proper punctuation and capitalization.
22
  """
23
- # Handle SQL aggregate functions
24
  text = re.sub(r'\bAVG\((.*?)\)', r'average \1', text, flags=re.IGNORECASE)
25
  text = re.sub(r'\bCOUNT\(\*\)', 'number of records', text, flags=re.IGNORECASE)
26
  text = re.sub(r'\bSUM\((.*?)\)', r'sum of \1', text, flags=re.IGNORECASE)
 
20
  Postprocesses the generated text to handle SQL aggregate functions like AVG, COUNT, etc.,
21
  and SQL-like conditions such as 'price > 100'. It ensures proper punctuation and capitalization.
22
  """
23
+ # Handle SQL aggregate functions (case-insensitive)
24
  text = re.sub(r'\bAVG\((.*?)\)', r'average \1', text, flags=re.IGNORECASE)
25
  text = re.sub(r'\bCOUNT\(\*\)', 'number of records', text, flags=re.IGNORECASE)
26
  text = re.sub(r'\bSUM\((.*?)\)', r'sum of \1', text, flags=re.IGNORECASE)