Update my_model/KBVQA.py
Browse files- my_model/KBVQA.py +2 -6
my_model/KBVQA.py
CHANGED
@@ -196,9 +196,6 @@ class KBVQA():
|
|
196 |
Returns:
|
197 |
str: The formatted prompt for the KBVQA model.
|
198 |
"""
|
199 |
-
|
200 |
-
if sys_prompt is None:
|
201 |
-
sys_prompt = config.SYSTEM_PROMPT
|
202 |
|
203 |
B_SENT = '<s>'
|
204 |
E_SENT = '</s>'
|
@@ -212,10 +209,9 @@ class KBVQA():
|
|
212 |
E_QES = '[/QES]'
|
213 |
B_OBJ = '[OBJ]'
|
214 |
E_OBJ = '[/OBJ]'
|
215 |
-
|
216 |
current_query = current_query.strip()
|
217 |
-
sys_prompt
|
218 |
-
|
219 |
if history is None:
|
220 |
if objects is None:
|
221 |
p = f"""{B_SENT}{B_INST} {B_SYS}{sys_prompt}{E_SYS}{B_CAP}{caption}{E_CAP}{B_QES}{current_query}{E_QES}{E_INST}"""
|
|
|
196 |
Returns:
|
197 |
str: The formatted prompt for the KBVQA model.
|
198 |
"""
|
|
|
|
|
|
|
199 |
|
200 |
B_SENT = '<s>'
|
201 |
E_SENT = '</s>'
|
|
|
209 |
E_QES = '[/QES]'
|
210 |
B_OBJ = '[OBJ]'
|
211 |
E_OBJ = '[/OBJ]'
|
|
|
212 |
current_query = current_query.strip()
|
213 |
+
if sys_prompt is None:
|
214 |
+
sys_prompt = config.SYSTEM_PROMPT.strip()
|
215 |
if history is None:
|
216 |
if objects is None:
|
217 |
p = f"""{B_SENT}{B_INST} {B_SYS}{sys_prompt}{E_SYS}{B_CAP}{caption}{E_CAP}{B_QES}{current_query}{E_QES}{E_INST}"""
|