Update static/index.html
Browse files- static/index.html +16 -39
static/index.html
CHANGED
|
@@ -1,40 +1,17 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
-
<html>
|
| 3 |
-
<head>
|
| 4 |
-
|
| 5 |
-
</head>
|
| 6 |
-
<body>
|
| 7 |
-
|
| 8 |
-
<
|
| 9 |
-
|
| 10 |
-
<
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
<
|
| 18 |
-
async function submitForm() {
|
| 19 |
-
const form = document.getElementById("uploadForm");
|
| 20 |
-
const formData = new FormData(form);
|
| 21 |
-
|
| 22 |
-
try {
|
| 23 |
-
const response = await fetch('/inference/', {
|
| 24 |
-
method: 'POST',
|
| 25 |
-
body: formData
|
| 26 |
-
});
|
| 27 |
-
|
| 28 |
-
if (!response.ok) {
|
| 29 |
-
throw new Error('Network response was not ok');
|
| 30 |
-
}
|
| 31 |
-
|
| 32 |
-
const result = await response.text();
|
| 33 |
-
document.getElementById("resultContainer").innerHTML = result;
|
| 34 |
-
} catch (error) {
|
| 35 |
-
console.error('There was an error!', error);
|
| 36 |
-
}
|
| 37 |
-
}
|
| 38 |
-
</script>
|
| 39 |
-
</body>
|
| 40 |
-
</html>
|
|
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
+
<html>
|
| 3 |
+
<head>
|
| 4 |
+
<title>AnimeGAN2 FastAPI Integration</title>
|
| 5 |
+
</head>
|
| 6 |
+
<body>
|
| 7 |
+
<h1>AnimeGAN2 FastAPI Integration</h1>
|
| 8 |
+
<form action="/predict/" enctype="multipart/form-data" method="post">
|
| 9 |
+
<input name="file" type="file">
|
| 10 |
+
<select name="version">
|
| 11 |
+
<option value="version 1">Version 1 (🔺 stylization, 🔻 robustness)</option>
|
| 12 |
+
<option value="version 2">Version 2 (🔺 robustness,🔻 stylization)</option>
|
| 13 |
+
</select>
|
| 14 |
+
<button type="submit">Predict</button>
|
| 15 |
+
</form>
|
| 16 |
+
</body>
|
| 17 |
+
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|