TestEnhancer / static /index.html
Rahul-Samedavar
sec
9bb62bc
raw
history blame contribute delete
790 Bytes
<!DOCTYPE html>
<html>
<head>
<title>Image Enhancer</title>
<style>
body { font-family: Arial; padding: 40px; }
img { max-width: 400px; margin-top: 20px; }
</style>
</head>
<body>
<h2>Real-ESRGAN Image Enhancer</h2>
<input type="file" id="fileInput">
<button onclick="upload()">Enhance</button>
<br>
<img id="result"/>
<script>
async function upload() {
const file = document.getElementById("fileInput").files[0];
if (!file) return alert("Select image");
const form = new FormData();
form.append("file", file);
const res = await fetch("/enhance", {
method: "POST",
body: form
});
const blob = await res.blob();
document.getElementById("result").src = URL.createObjectURL(blob);
}
</script>
</body>
</html>