app.py
CHANGED
@@ -66,8 +66,8 @@ def extract_json(gen_text, n_shot_learning=0):
|
|
66 |
gen_text = gen_text[start_index:]
|
67 |
start_index = gen_text.index("### Response:\n{") + 14
|
68 |
|
69 |
-
|
70 |
-
|
71 |
print("Start***No end index!!!")
|
72 |
print(gen_text)
|
73 |
print("End***No end index!!!")
|
|
|
66 |
gen_text = gen_text[start_index:]
|
67 |
start_index = gen_text.index("### Response:\n{") + 14
|
68 |
|
69 |
+
end_index = gen_text.find("}\n\n### ")
|
70 |
+
if(end_index != -1) :
|
71 |
print("Start***No end index!!!")
|
72 |
print(gen_text)
|
73 |
print("End***No end index!!!")
|