| <!doctype html> |
| <html lang="en" data-bs-theme="dark"> |
|
|
| <head> |
| <meta charset="utf-8"> |
| <meta name="viewport" content="width=device-width, initial-scale=1"> |
| <title>Image Classifier</title> |
| <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet" |
| integrity="sha384-9ndCyUaIbzAi2FUVXJi0CjmCapSmO7SnpJef0486qhLnuZ2cdeRhO02iuK6FUUVM" crossorigin="anonymous"> |
| |
| </head> |
|
|
| <body> |
|
|
| <center> |
| <div class="container my-4"> |
| <h1 class="fs-2 text"> Image Classifier - Is your image AI generated?</h1> |
| <form action="/edit" method="post" enctype="multipart/form-data"> |
| <div class="mb-3"> |
| <label for="formFile" class="form-label">Select Image to classify</label> |
| <input class="form-control" type="file" name="file" id="formFile"> |
| </div> |
|
|
| <button type="submit" class="btn btn-success">Submit</button> |
| </form> |
| </div> |
|
|
| <div> |
| {% if filename %} |
| <div style="padding: 20px;"> |
| <img src="{{url_for('display_image', filename=filename)}} " style="height: 30%; width: 30%;"> |
| </div> |
| {% endif %} |
| <p> |
| <h4> |
| {% with messages = get_flashed_messages() %} |
| {% if messages %} |
| <ul class=flashes> |
| {% for message in messages %} |
| <li>{{ message }}</li> |
| {% endfor %} |
| </ul> |
| {% endif %} |
| {% endwith %} |
| </h4> |
| </p> |
| </div> |
| </center> |
| <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js" |
| integrity="sha384-geWF76RCwLtnZ8qwWowPQNguL3RmwHVBC9FhGdlKrxdiJJigb/j/68SIy3Te4Bkz" |
| crossorigin="anonymous"></script> |
| </body> |
|
|
| </html> |