Spaces:
Sleeping
Sleeping
arjunanand13
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -106,7 +106,7 @@ 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 |
-
match2 = re.search(r'Solution:(.*?)</s>',
|
110 |
if match1:
|
111 |
solution_text = match1.group(1).strip()
|
112 |
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 |
+
match2 = re.search(r'Solution:(.*?)</s>', generated_response, re.DOTALL | re.IGNORECASE)
|
110 |
if match1:
|
111 |
solution_text = match1.group(1).strip()
|
112 |
print(solution_text)
|