Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -124,28 +124,21 @@ def verify_signature(document_image, reference_number):
|
|
124 |
|
125 |
return f"π Similarity Score: {similarity_percentage}%\nπ {classification}", matched_img
|
126 |
|
127 |
-
|
128 |
-
import gradio as gr
|
129 |
-
|
130 |
-
# β
Ensure you have the correct function for signature verification
|
131 |
-
def verify_signature(document_image, policy_number):
|
132 |
-
return f"Processing {document_image} with policy number {policy_number}"
|
133 |
-
|
134 |
-
# β
Corrected Gradio Interface (Removed `theme="compact"`)
|
135 |
interface = gr.Interface(
|
136 |
fn=verify_signature,
|
137 |
inputs=[
|
138 |
gr.Image(type="filepath", label="Upload Document Image"),
|
139 |
-
gr.Number(label="Enter
|
140 |
],
|
141 |
outputs=[
|
142 |
gr.Textbox(label="Verification Result"),
|
143 |
gr.Image(label="Signature Matching Visualization")
|
144 |
],
|
145 |
title="ποΈ Signature Verification System",
|
146 |
-
description="Upload a document with a signature, select a policy number, and verify its authenticity."
|
|
|
147 |
)
|
148 |
|
149 |
-
# β
|
150 |
-
interface.launch(
|
151 |
-
|
|
|
124 |
|
125 |
return f"π Similarity Score: {similarity_percentage}%\nπ {classification}", matched_img
|
126 |
|
127 |
+
# β
Gradio Interface
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
interface = gr.Interface(
|
129 |
fn=verify_signature,
|
130 |
inputs=[
|
131 |
gr.Image(type="filepath", label="Upload Document Image"),
|
132 |
+
gr.Number(label="Enter Reference policynumber", precision=0)
|
133 |
],
|
134 |
outputs=[
|
135 |
gr.Textbox(label="Verification Result"),
|
136 |
gr.Image(label="Signature Matching Visualization")
|
137 |
],
|
138 |
title="ποΈ Signature Verification System",
|
139 |
+
description="Upload a document with a signature, select a policy number, and verify its authenticity.",
|
140 |
+
theme="compact"
|
141 |
)
|
142 |
|
143 |
+
# β
Launch Gradio App
|
144 |
+
interface.launch()
|
|