arjunanand13 commited on
Commit
b27ddbb
1 Parent(s): b04cf81

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -106,11 +106,12 @@ class DocumentRetrievalAndGeneration:
106
  decoded = self.llm.tokenizer.batch_decode(generated_ids)
107
  generated_response = decoded[0]
108
  match1 = re.search(r'\[/INST\](.*?)</s>', generated_response, re.DOTALL)
109
- match12 = re.search(r'Solution:(.*?)', solution_text, re.DOTALL)
110
  match2 = re.search(r'Solution:(.*?)</s>', generated_response, re.DOTALL | re.IGNORECASE)
111
  if match1:
112
  solution_text = match1.group(1).strip()
113
  print(solution_text)
 
114
  if match12:
115
  solution_text=match12.group(1).strip()
116
  print(solution_text)
 
106
  decoded = self.llm.tokenizer.batch_decode(generated_ids)
107
  generated_response = decoded[0]
108
  match1 = re.search(r'\[/INST\](.*?)</s>', generated_response, re.DOTALL)
109
+
110
  match2 = re.search(r'Solution:(.*?)</s>', generated_response, re.DOTALL | re.IGNORECASE)
111
  if match1:
112
  solution_text = match1.group(1).strip()
113
  print(solution_text)
114
+ match12 = re.search(r'Solution:(.*?)', solution_text, re.DOTALL)
115
  if match12:
116
  solution_text=match12.group(1).strip()
117
  print(solution_text)