Ashrafb commited on
Commit
2d1dea6
·
verified ·
1 Parent(s): 38236e6

Update static/index.html

Browse files
Files changed (1) hide show
  1. static/index.html +16 -39
static/index.html CHANGED
@@ -1,40 +1,17 @@
1
  <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>Aiconvert.online</title>
5
- </head>
6
- <body>
7
- <form id="uploadForm" enctype="multipart/form-data">
8
- <input type="file" id="fileInput" name="file">
9
- <select id="versionSelect" name="ver">
10
- <option value="version1">Version 1 (🔺 stylization, 🔻 robustness)</option>
11
- <option value="version2" selected>Version 2 (🔺 robustness, 🔻 stylization)</option>
12
- </select>
13
- <button type="button" onclick="submitForm()">Submit</button>
14
- </form>
15
- <div id="resultContainer"></div>
16
-
17
- <script>
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>