786avinash commited on
Commit
6d75585
Β·
verified Β·
1 Parent(s): ff87b83

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -6
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
- # βœ… 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 the policy number", 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(server_name="0.0.0.0", server_port=7860, enable_queue=True)
 
 
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
+