Spaces:
Running
Running
File size: 1,604 Bytes
c652a8b 881e01f 0bea3f5 881e01f 0bea3f5 881e01f 0bea3f5 881e01f 396a357 881e01f 396a357 0bea3f5 396a357 ffb8ef6 396a357 0bea3f5 396a357 |
1 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 |
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>My Static Space</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div class="card">
<h1>Welcome to your Static Space!</h1>
<p>You can modify this app directly by editing <i>index.html</i> in the Files and Versions tab.</p>
<p>
Also, don't forget to check the
<a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
</p>
<div class="prompt-toolbox">
<h2>Prompt Toolbox Reverse Prompt Engineering Code Tool</h2>
<p>Use this tool to generate code based on a desired prompt. Simply enter your prompt in the input field below and click "Generate Code".</p>
<form>
<label for="prompt">Enter your prompt:</label>
<input type="text" id="prompt" name="prompt" />
<button type="button" onclick="generateCode()">Generate Code</button>
</form>
<div id="code"></div>
</div>
</div>
<script>
/**
* Generates code based on user input prompt.
*/
function generateCode() {
const promptInput = document.getElementById("prompt");
const codeOutput = document.getElementById("code");
if (promptInput && codeOutput) {
const prompt = promptInput.value;
// Example: Generating code based on the prompt
const generatedCode = "Generated code: " + prompt.toUpperCase();
codeOutput.innerText = generatedCode;
} else {
console.error("Error generating code. Prompt input or code output element not found.");
}
}
</script>
</body>
</html> |