doc extractor: force if else on number plate extraction
All checks were successful
build-and-deploy / build-deploy (push) Successful in 1m5s
All checks were successful
build-and-deploy / build-deploy (push) Successful in 1m5s
This commit is contained in:
@@ -216,17 +216,18 @@ class GuestDocuments(
|
|||||||
imageUrl,
|
imageUrl,
|
||||||
"IS THIS A VEHICLE NUMBER PLATE PHOTO? Answer YES or NO only."
|
"IS THIS A VEHICLE NUMBER PLATE PHOTO? Answer YES or NO only."
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
results["hasAadhar"] = llamaClient.ask(imageUrl, "CONTAINS AADHAAR? Answer YES or NO only.")
|
||||||
|
results["hasUidai"] = llamaClient.ask(imageUrl, "CONTAINS UIDAI? Answer YES or NO only.")
|
||||||
|
val hasAadhar = isYes(results["hasAadhar"]) || isYes(results["hasUidai"])
|
||||||
if (isYes(results["isVehiclePhoto"])) {
|
if (isYes(results["isVehiclePhoto"])) {
|
||||||
results["vehicleNumber"] = llamaClient.ask(
|
results["vehicleNumber"] = llamaClient.ask(
|
||||||
imageUrl,
|
imageUrl,
|
||||||
"VEHICLE NUMBER PLATE? Reply only number or NONE."
|
"VEHICLE NUMBER PLATE? Reply only number or NONE."
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
else if (hasAadhar) {
|
||||||
results["hasAadhar"] = llamaClient.ask(imageUrl, "CONTAINS AADHAAR? Answer YES or NO only.")
|
|
||||||
results["hasUidai"] = llamaClient.ask(imageUrl, "CONTAINS UIDAI? Answer YES or NO only.")
|
|
||||||
val hasAadhar = isYes(results["hasAadhar"]) || isYes(results["hasUidai"])
|
|
||||||
if (hasAadhar) {
|
|
||||||
val aadharQuestions = linkedMapOf(
|
val aadharQuestions = linkedMapOf(
|
||||||
"hasAddress" to "POSTAL ADDRESS PRESENT? Answer YES or NO only.",
|
"hasAddress" to "POSTAL ADDRESS PRESENT? Answer YES or NO only.",
|
||||||
"hasDob" to "DOB? Reply YES or NO.",
|
"hasDob" to "DOB? Reply YES or NO.",
|
||||||
|
|||||||
Reference in New Issue
Block a user