-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
17 lines (15 loc) · 668 Bytes
/
main.py
File metadata and controls
17 lines (15 loc) · 668 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from gradio import Interface
from qr_decoder import decode_and_audit
from report_generator import generate_audit_report
def qr_code_audit_app(image, api_key):
analysis_result, qr_data, link_category, url_type, urlscan_details = decode_and_audit(image, api_key)
generate_audit_report([(image, qr_data, link_category)])
return analysis_result, qr_data, link_category, url_type, urlscan_details
iface = Interface(
fn=qr_code_audit_app,
inputs=["image", "text"],
outputs=["text", "text", "text", "text", "text"],
title="QR Code Audit Detector",
description="Scan QR codes and analyze potential threats using urlscan.io."
)
iface.launch()