Spaces:
Running
Running
| <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> |