shivanis14
commited on
Commit
•
49be9b4
1
Parent(s):
2e1f3a0
Update app.py
Browse files
app.py
CHANGED
@@ -406,8 +406,7 @@ The output must be in JSON format as follows:
|
|
406 |
'Detailed Analysis': <An in-depth explanation of the claim, incorporating relevant regulatory guidelines and health perspectives to support the verdict>
|
407 |
}
|
408 |
}
|
409 |
-
|
410 |
-
If information about a claim is not found in the documents, the value for that claim must start with the prefix '(NOT FOUND IN DOCUMENT)' followed by the LLM's response based on its own knowledge."""
|
411 |
}
|
412 |
]
|
413 |
)
|
@@ -435,14 +434,15 @@ If information about a claim is not found in the documents, the value for that c
|
|
435 |
#citations.append(f"[{index}] {cited_file.filename}")
|
436 |
message_content.value = message_content.value.replace(annotation.text, "")
|
437 |
|
438 |
-
if debug_mode:
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
claims_analysis = json.loads(message_content.value.replace("```", "").replace("json", "").replace("(NOT FOUND IN DOCUMENT) ", ""))
|
|
|
446 |
|
447 |
claims_analysis_str = ""
|
448 |
for key, value in claims_analysis.items():
|
|
|
406 |
'Detailed Analysis': <An in-depth explanation of the claim, incorporating relevant regulatory guidelines and health perspectives to support the verdict>
|
407 |
}
|
408 |
}
|
409 |
+
"""
|
|
|
410 |
}
|
411 |
]
|
412 |
)
|
|
|
434 |
#citations.append(f"[{index}] {cited_file.filename}")
|
435 |
message_content.value = message_content.value.replace(annotation.text, "")
|
436 |
|
437 |
+
#if debug_mode:
|
438 |
+
# claims_not_found_in_doc = []
|
439 |
+
# print(message_content.value)
|
440 |
+
# for key, value in json.loads(message_content.value.replace("```", "").replace("json", "")).items():
|
441 |
+
# if value.startswith("(NOT FOUND IN DOCUMENT)"):
|
442 |
+
# claims_not_found_in_doc.append(key)
|
443 |
+
# print(f"Claims not found in the doc are {','.join(claims_not_found_in_doc)}")
|
444 |
+
#claims_analysis = json.loads(message_content.value.replace("```", "").replace("json", "").replace("(NOT FOUND IN DOCUMENT) ", ""))
|
445 |
+
claims_analysis = json.loads(message_content.value.replace("```", "").replace("json", ""))
|
446 |
|
447 |
claims_analysis_str = ""
|
448 |
for key, value in claims_analysis.items():
|