Spaces:
Running
Running
Update templates/interface.html
Browse files- templates/interface.html +13 -3
templates/interface.html
CHANGED
@@ -10,7 +10,7 @@
|
|
10 |
<body>
|
11 |
|
12 |
|
13 |
-
<form method="post" action="/">
|
14 |
<div>
|
15 |
<label for="text_input">Text to synthesize:</label>
|
16 |
<input type="text" id="text_input" name="text_input" value="1, 2, 3. Enter your text here">
|
@@ -61,6 +61,18 @@
|
|
61 |
<a href="{{ file_url }}" download>Download Audio</a>
|
62 |
{% endif %}
|
63 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
64 |
<!-- Move the JavaScript code outside the conditional block -->
|
65 |
<script>
|
66 |
const playCheckbox = document.getElementById("play");
|
@@ -77,8 +89,6 @@
|
|
77 |
}
|
78 |
});
|
79 |
</script>
|
80 |
-
|
81 |
-
</form>
|
82 |
</body>
|
83 |
</html>
|
84 |
|
|
|
10 |
<body>
|
11 |
|
12 |
|
13 |
+
<form method="post" action="/" onsubmit="showLoadingMessage()">
|
14 |
<div>
|
15 |
<label for="text_input">Text to synthesize:</label>
|
16 |
<input type="text" id="text_input" name="text_input" value="1, 2, 3. Enter your text here">
|
|
|
61 |
<a href="{{ file_url }}" download>Download Audio</a>
|
62 |
{% endif %}
|
63 |
|
64 |
+
|
65 |
+
|
66 |
+
</form>
|
67 |
+
<script>
|
68 |
+
function showLoadingMessage() {
|
69 |
+
// Display the loading message
|
70 |
+
document.getElementById("loading-message").innerText = "Generating your audio, please wait...";
|
71 |
+
|
72 |
+
// Optionally, you can disable the form elements to prevent further interactions while waiting
|
73 |
+
document.getElementById("synthesize_button").disabled = true;
|
74 |
+
}
|
75 |
+
</script>
|
76 |
<!-- Move the JavaScript code outside the conditional block -->
|
77 |
<script>
|
78 |
const playCheckbox = document.getElementById("play");
|
|
|
89 |
}
|
90 |
});
|
91 |
</script>
|
|
|
|
|
92 |
</body>
|
93 |
</html>
|
94 |
|