Spaces:
Sleeping
Sleeping
update
Browse files- static/index.html +41 -37
- static/script.js +1 -1
- 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 |
-
|
13 |
-
|
14 |
-
<
|
15 |
-
|
16 |
-
|
17 |
-
|
|
|
|
|
|
|
|
|
|
|
18 |
</div>
|
19 |
-
<
|
20 |
-
<
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
|
37 |
-
|
38 |
-
|
39 |
-
|
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('
|
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 |
-
|
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 |
-
|
|
|
|
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 |
+
}
|