<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Upload and Display Image from FastAPI Response</title>
    <style>
        #preview {
            margin-top: 20px;
            max-width: 100%;
            max-height: 400px;
            display: none;
        }
    </style>
</head>
<body>
    <h1>Upload an Image and Display the Response</h1>
    <form id="uploadForm">
        <label for="image">Choose an 