BenBranyon commited on
Commit
578cce2
1 Parent(s): 65f8951

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -19,8 +19,8 @@ def query(payload):
19
  try:
20
  data = json.loads(response.content.decode("utf-8"))
21
  generated_text = data[0]['generated_text']
22
- re.sub(r'<|system|>.*?<|assistant|>', '', generated_text, flags=re.DOTALL)
23
- return response
24
  except:
25
  return response
26
 
 
19
  try:
20
  data = json.loads(response.content.decode("utf-8"))
21
  generated_text = data[0]['generated_text']
22
+ cleaned_text = re.sub(r'<|system|>.*?<|assistant|>', '', generated_text, flags=re.DOTALL)
23
+ return cleaned_text
24
  except:
25
  return response
26