| import gradio as gr |
| from utils import analyze_url, password_strength |
| from phishing_model import detect_phishing |
| from ai_advisor import ai_advisor |
|
|
| with gr.Blocks(title="AI Cyber Security Tool") as app: |
|
|
| gr.Markdown("# π AI Cyber Security Tool") |
|
|
| |
| with gr.Tab("π URL & Domain Analyzer"): |
| url_input = gr.Textbox(label="Enter URL") |
| url_output = gr.Textbox(label="Result") |
| gr.Button("Scan").click(analyze_url, inputs=url_input, outputs=url_output) |
|
|
| |
| with gr.Tab("π Password Analyzer"): |
| pass_input = gr.Textbox(label="Enter Password", type="password") |
| pass_output = gr.Textbox(label="Result") |
| gr.Button("Check").click(password_strength, inputs=pass_input, outputs=pass_output) |
|
|
| |
| with gr.Tab("π§ Phishing Detector"): |
| phishing_input = gr.Textbox(label="Enter URL or Email Text") |
| phishing_output = gr.Textbox(label="Result") |
| gr.Button("Analyze").click(detect_phishing, inputs=phishing_input, outputs=phishing_output) |
|
|
| |
| with gr.Tab("π€ AI Security Advisor"): |
| q_input = gr.Textbox(label="Ask Security Question") |
| q_output = gr.Textbox(label="Answer") |
| gr.Button("Ask").click(ai_advisor, inputs=q_input, outputs=q_output) |
|
|
| app.launch() |