jclyo1 commited on
Commit
1ec50d0
1 Parent(s): 79af4ee
Files changed (3) hide show
  1. static/index.html +41 -37
  2. static/script.js +1 -1
  3. static/style.css +53 -50
static/index.html CHANGED
@@ -9,44 +9,48 @@
9
  <script type="module" src="https://display.truepic.com/truepic_display.es.js"></script>
10
  </head>
11
  <body>
12
- <main>
13
- <section id="text-gen">
14
- <h1>Text to Image with Signed Attribution</h1>
15
- <div id="outputClass">
16
-
17
-
 
 
 
 
 
18
  </div>
19
- <form class="text-gen-form" style="padding:40px 0;">
20
- <label for="text-gen-input">Enter prompt: </label>
21
- <input
22
- id="text-gen-input"
23
- type="text"
24
- value=""
25
- style="margin:40px 0;"
26
- />
27
-
28
- <label>Inference Steps: </label>
29
-
30
- <select style="width:20%" id="inference_steps">
31
- <option value="5">5</option>
32
- <option value="10">10</option>
33
- <option value="20">20</option>
34
- <option value="50" selected>50</option>
35
- </select>
 
 
 
 
 
 
 
 
 
 
36
 
37
- <label>Model: </label>
38
-
39
- <select style="width:20%" id="model">
40
- <option value="runwayml/stable-diffusion-v1-5">runwayml/stable-diffusion-v1-5</option>
41
- <option value="CompVis/stable-diffusion-v1-4">CompVis/stable-diffusion-v1-4</option>
42
- <option value="stabilityai/stable-diffusion-2-1">stabilityai/stable-diffusion-2-1</option>
43
- </select>
44
-
45
- <button id="text-gen-submit">Submit</button>
46
- </form>
47
-
48
- <form method="get" id="redirect-form" action="/"></form>
49
- </section>
50
- </main>
51
  </body>
52
  </html>
 
9
  <script type="module" src="https://display.truepic.com/truepic_display.es.js"></script>
10
  </head>
11
  <body>
12
+ <section id="header">
13
+ <h1>Text-to-image with signed attribution</h1>
14
+ <p>Dignissim turpis eu eu vel porttitor ipsum rutrum vitae. Condimentum sit bibendum vitae sit morbi sit vitae dolor.</p>
15
+ </section>
16
+ <section id="content">
17
+ <div id="column-one">
18
+ <div class="output">
19
+ <div class="image-container">
20
+
21
+ </div>
22
+ </div>
23
  </div>
24
+ <div id="column-two">
25
+ <form class="text-gen-form">
26
+ <label for="text-gen-input">Image prompt:</label>
27
+ <textarea
28
+ id="text-gen-input"
29
+ style="width:100%;height:80px;"></textarea>
30
+
31
+
32
+ <label>Inference Steps: </label>
33
+ <select id="inference_steps">
34
+ <option value="5">5</option>
35
+ <option value="10">10</option>
36
+ <option value="20">20</option>
37
+ <option value="50" selected>50</option>
38
+ </select>
39
+
40
+ <label>Model: </label>
41
+ <select id="model">
42
+ <option value="runwayml/stable-diffusion-v1-5">runwayml/stable-diffusion-v1-5</option>
43
+ <option value="CompVis/stable-diffusion-v1-4">CompVis/stable-diffusion-v1-4</option>
44
+ <option value="stabilityai/stable-diffusion-2-1">stabilityai/stable-diffusion-2-1</option>
45
+ </select>
46
+
47
+ <button id="text-gen-submit">Submit</button>
48
+ </form>
49
+
50
+ <form method="get" id="redirect-form" action="/"></form>
51
 
52
+ </div>
53
+ </section>
54
+
 
 
 
 
 
 
 
 
 
 
 
55
  </body>
56
  </html>
static/script.js CHANGED
@@ -42,7 +42,7 @@ textGenForm.addEventListener('submit', async (event) => {
42
  const resp = await generateImage(textGenInput.value, inferenceSteps.value, model.value);
43
  const path = "/" + resp;
44
 
45
- var resultsContainer = document.getElementById('outputClass');
46
  var truepicDisplay = document.createElement('truepic-display');
47
  var truepic = document.createElement('img');
48
  truepic.src = path;
 
42
  const resp = await generateImage(textGenInput.value, inferenceSteps.value, model.value);
43
  const path = "/" + resp;
44
 
45
+ var resultsContainer = document.getElementById('image-container');
46
  var truepicDisplay = document.createElement('truepic-display');
47
  var truepic = document.createElement('img');
48
  truepic.src = path;
static/style.css CHANGED
@@ -1,51 +1,54 @@
 
 
1
  body {
2
- --text: hsl(0 0% 15%);
3
- padding: 2.5rem;
4
- font-family: sans-serif;
5
- color: var(--text);
6
- }
7
-
8
- body.dark-theme {
9
- --text: hsl(0 0% 90%);
10
- background-color: hsl(223 39% 7%);
11
- }
12
-
13
- main {
14
- max-width: 680rem;
15
- }
16
-
17
- section {
18
- display: flex;
19
- flex-direction: column;
20
- align-items: center;
21
- }
22
-
23
- a {
24
- color: var(--text);
25
- }
26
-
27
- form {
28
- margin: 0 auto;
29
- }
30
-
31
- label {
32
- display: inline-block;
33
- width: 18%;
34
- }
35
-
36
- input {
37
- width: 80%;
38
- margin: 20px 0;
39
- }
40
-
41
- button {
42
- cursor: pointer;
43
- display: block;
44
- margin: 20px 0;
45
- }
46
-
47
- .text-gen-output {
48
- min-height: 1.2rem;
49
- margin: 1rem;
50
- border: 0.5px solid grey;
51
- }
 
 
1
+ @import url('https://fonts.cdnfonts.com/css/inter');
2
+
3
  body {
4
+ font-family: 'Inter', sans-serif;
5
+ }
6
+
7
+ section {
8
+ width: 100%;
9
+ }
10
+
11
+ section#header {
12
+ padding: 1rem 10rem;
13
+ border-bottom: 1px solid rgba(227, 234, 240, 1);
14
+ }
15
+
16
+ section#content {
17
+ display: flex;
18
+ }
19
+
20
+ h1 {
21
+ font-size: 26px;
22
+ font-weight: 600;
23
+ }
24
+
25
+ p {
26
+ font-size: 14px;
27
+ font-weight: 400;
28
+ }
29
+
30
+ label {
31
+ display: block;
32
+ font-weight: 600;
33
+ font-size: 14px;
34
+ padding-bottom: .5rem;
35
+ }
36
+
37
+ select, textarea {
38
+ border: 1px solid rgba(227, 234, 240, 1);
39
+ margin-bottom: 1rem;
40
+ width: 100%;
41
+ padding: .5rem;
42
+ }
43
+
44
+ #column-one {
45
+ width: 66%;
46
+ padding-left: 10rem;
47
+ border-right: 1px solid rgba(227, 234, 240, 1);
48
+ }
49
+
50
+ #column-two {
51
+ width: 34%;
52
+ padding: 2rem;
53
+ padding-right: 10rem;
54
+ }