File size: 2,820 Bytes
be16e3e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<!--<link rel="stylesheet" href="{{ url_for('static', filename='style.css', _external=True) }}" />-->
<!--<script type="module" src="{{ url_for('static', filename='script.js', _external=True) }}"></script>-->



<!--<!DOCTYPE html>-->
<!--<html lang="en">-->
<!--  <head>-->
<!--    <meta charset="UTF-8" />-->
<!--    <meta name="viewport" content="width=device-width, initial-scale=1.0" />-->
<!--    <title>Flask API</title>-->
<!--    <link rel="stylesheet" href="style.css" />-->
<!--    <script type="module" src="script.js"></script>-->
<!--  </head>-->
<!--  <body>-->
<!--    <main>-->
<!--      <section id="text-gen">-->
<!--        <h1>Text generation using Flan T5</h1>-->
<!--        <p>-->
<!--          Model:-->
<!--          <a-->
<!--              href="https://huggingface.co/1vash/mnist_demo_model"-->
<!--              rel="noreferrer"-->
<!--              target="_blank"-->
<!--            >1vash/mnist_demo_model</a-->
<!--          >-->
<!--        </p>-->
<!--        <form class="text-gen-form">-->
<!--          <label for="text-gen-input">Text prompt</label>-->
<!--          <input-->
<!--            id="text-gen-input"-->
<!--            type="text"-->
<!--            value="English: Translate There are many ducks. German:"-->
<!--          />-->
<!--          <button id="text-gen-submit">Submit</button>-->
<!--          <p class="text-gen-output"></p>-->
<!--        </form>-->
<!--      </section>-->
<!--    </main>-->
<!--  </body>-->
<!--</html>-->

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Flask API</title>
<!--    304 status codes indicate that the files are being cached by the browser. There is no error or issue to be concerned about in this case.-->
    <link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}" />
    <script type="module" src="{{ url_for('static', filename='script.js') }}"></script>

<!--    <link rel="stylesheet" href="style.css" />-->
<!--    <script type="module" src="script.js"></script>-->
  </head>
  <body>
    <main>
      <section id="text-gen">
        <h1>Text generation using Flan T5</h1>
        <p>
          Model:
          <a
              href="https://huggingface.co/1vash/mnist_demo_model"
              rel="noreferrer"
              target="_blank"
            >1vash/mnist_demo_model</a
          >
        </p>
        <form class="image-upload-form" action="/predict" method="POST" enctype="multipart/form-data">
          <label for="image-upload-input">Upload an image:</label>
          <input id="image-upload-input" type="file" accept="image/*" name="image" />
          <button id="image-upload-submit">Upload</button>
        </form>
      </section>
    </main>
  </body>
</html>