VanguardAI commited on
Commit
f506cc8
·
verified ·
1 Parent(s): f339bab

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -74,10 +74,10 @@ def chunk_it(inventory_list, user_input_text):
74
  outputs = model.generate(**inputs, max_new_tokens=216, use_cache=True)
75
 
76
  reply = tokenizer.batch_decode(outputs, skip_special_tokens=True)
77
- pattern = r"### Response:\n(.*?)<\|end_of_text\|>"
78
- # Search for the pattern in the text
79
- match = re.search(pattern, reply[0], re.DOTALL) # re.DOTALL allows '.' to match newlines
80
- reply = match.group(1).strip()
81
  return reply
82
 
83
  # Interface for inputs
 
74
  outputs = model.generate(**inputs, max_new_tokens=216, use_cache=True)
75
 
76
  reply = tokenizer.batch_decode(outputs, skip_special_tokens=True)
77
+ # pattern = r"### Response:\n(.*?)<\|end_of_text\|>"
78
+ # # Search for the pattern in the text
79
+ # match = re.search(pattern, reply[0], re.DOTALL) # re.DOTALL allows '.' to match newlines
80
+ # reply = match.group(1).strip()
81
  return reply
82
 
83
  # Interface for inputs