jclyo1 commited on
Commit
8bd9ad4
1 Parent(s): 8ff02a8
Files changed (2) hide show
  1. static/index.html +6 -1
  2. static/script.js +10 -2
static/index.html CHANGED
@@ -12,7 +12,12 @@
12
  <main>
13
  <section id="text-gen">
14
  <h1>Text to Image with Signed Attribution</h1>
15
- <truepic-display><img src="/output.jpg" id="output" /></truepic-display>
 
 
 
 
 
16
  <form class="text-gen-form" style="padding:40px 0;">
17
  <label for="text-gen-input">Enter prompt: </label>
18
  <input
 
12
  <main>
13
  <section id="text-gen">
14
  <h1>Text to Image with Signed Attribution</h1>
15
+ <truepic-display><img src="/output.jpg" id="outputImg" /></truepic-display>
16
+
17
+ <div id="outputClass">
18
+
19
+
20
+ </div>
21
  <form class="text-gen-form" style="padding:40px 0;">
22
  <label for="text-gen-input">Enter prompt: </label>
23
  <input
static/script.js CHANGED
@@ -41,8 +41,16 @@ textGenForm.addEventListener('submit', async (event) => {
41
  try {
42
  const resp = await generateImage(textGenInput.value, inferenceSteps.value, model.value);
43
  const path = "/" + resp;
44
- alert(path);
45
- document.getElementById("outputImg").src = path;
 
 
 
 
 
 
 
 
46
  // document.getElementById("redirect-form").submit();
47
  } catch (err) {
48
  console.error(err);
 
41
  try {
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;
49
+
50
+ truepicDisplay.appendChild(truepic);
51
+
52
+ resultsContainer.appendChild(truepicDisplay);
53
+
54
  // document.getElementById("redirect-form").submit();
55
  } catch (err) {
56
  console.error(err);