Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -124,21 +124,28 @@ def verify_signature(document_image, reference_number):
|
|
124 |
|
125 |
return f"π Similarity Score: {similarity_percentage}%\nπ {classification}", matched_img
|
126 |
|
127 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
interface = gr.Interface(
|
129 |
fn=verify_signature,
|
130 |
inputs=[
|
131 |
gr.Image(type="filepath", label="Upload Document Image"),
|
132 |
-
gr.Number(label="Enter the
|
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
|
140 |
-
theme="compact"
|
141 |
)
|
142 |
|
143 |
-
# β
|
144 |
-
interface.launch(server_name="0.0.0.0", server_port=7860
|
|
|
|
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 the Policy Number", precision=0)
|
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 |
+
# β
Corrected `launch()` command (Removed `enable_queue`)
|
150 |
+
interface.launch(server_name="0.0.0.0", server_port=7860)
|
151 |
+
|