Spaces:
Running
Running
Commit
·
0bea3f5
1
Parent(s):
ffb8ef6
Update index.html
Browse files- index.html +9 -4
index.html
CHANGED
|
@@ -3,15 +3,15 @@
|
|
| 3 |
<head>
|
| 4 |
<meta charset="utf-8" />
|
| 5 |
<meta name="viewport" content="width=device-width" />
|
| 6 |
-
<title>My
|
| 7 |
<link rel="stylesheet" href="style.css" />
|
| 8 |
</head>
|
| 9 |
<body>
|
| 10 |
<div class="card">
|
| 11 |
-
<h1>Welcome to your
|
| 12 |
-
<p>You can modify this app directly by editing <i>index.html</i> in the Files and
|
| 13 |
<p>
|
| 14 |
-
Also don't forget to check the
|
| 15 |
<a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
|
| 16 |
</p>
|
| 17 |
<div class="prompt-toolbox">
|
|
@@ -26,6 +26,9 @@
|
|
| 26 |
</div>
|
| 27 |
</div>
|
| 28 |
<script>
|
|
|
|
|
|
|
|
|
|
| 29 |
function generateCode() {
|
| 30 |
const promptInput = document.getElementById("prompt");
|
| 31 |
const codeOutput = document.getElementById("code");
|
|
@@ -36,6 +39,8 @@
|
|
| 36 |
const generatedCode = "Generated code: " + prompt.toUpperCase();
|
| 37 |
|
| 38 |
codeOutput.innerText = generatedCode;
|
|
|
|
|
|
|
| 39 |
}
|
| 40 |
}
|
| 41 |
</script>
|
|
|
|
| 3 |
<head>
|
| 4 |
<meta charset="utf-8" />
|
| 5 |
<meta name="viewport" content="width=device-width" />
|
| 6 |
+
<title>My Static Space</title>
|
| 7 |
<link rel="stylesheet" href="style.css" />
|
| 8 |
</head>
|
| 9 |
<body>
|
| 10 |
<div class="card">
|
| 11 |
+
<h1>Welcome to your Static Space!</h1>
|
| 12 |
+
<p>You can modify this app directly by editing <i>index.html</i> in the Files and Versions tab.</p>
|
| 13 |
<p>
|
| 14 |
+
Also, don't forget to check the
|
| 15 |
<a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
|
| 16 |
</p>
|
| 17 |
<div class="prompt-toolbox">
|
|
|
|
| 26 |
</div>
|
| 27 |
</div>
|
| 28 |
<script>
|
| 29 |
+
/**
|
| 30 |
+
* Generates code based on user input prompt.
|
| 31 |
+
*/
|
| 32 |
function generateCode() {
|
| 33 |
const promptInput = document.getElementById("prompt");
|
| 34 |
const codeOutput = document.getElementById("code");
|
|
|
|
| 39 |
const generatedCode = "Generated code: " + prompt.toUpperCase();
|
| 40 |
|
| 41 |
codeOutput.innerText = generatedCode;
|
| 42 |
+
} else {
|
| 43 |
+
console.error("Error generating code. Prompt input or code output element not found.");
|
| 44 |
}
|
| 45 |
}
|
| 46 |
</script>
|