Spaces:
Running
Running
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Neural Word Wizard</title> | |
| <link rel="stylesheet" href="style.css"> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script> | |
| <script src="https://unpkg.com/feather-icons"></script> | |
| </head> | |
| <body class="bg-gray-100 min-h-screen"> | |
| <custom-navbar></custom-navbar> | |
| <div class="container mx-auto px-4 py-12 mt-20"> | |
| <header class="text-center mb-12"> | |
| <div class="flex items-center justify-center space-x-3"> | |
| <i data-feather="zap" class="w-10 h-10 text-purple-600"></i> | |
| <h1 class="text-4xl font-bold bg-gradient-to-r from-purple-600 to-blue-500 bg-clip-text text-transparent">Neural Word Wizard</h1> | |
| </div> | |
| <p class="mt-4 text-lg text-gray-600">Fix your typos with AI magic! ✨</p> | |
| </header> | |
| <div class="max-w-2xl mx-auto bg-white rounded-xl shadow-md overflow-hidden p-6"> | |
| <div class="mb-4 flex justify-between items-center"> | |
| <h2 class="text-xl font-semibold">Train Your Model</h2> | |
| <a href="word-dataset.html" class="text-sm text-purple-600 hover:text-purple-800 flex items-center"> | |
| <i data-feather="list" class="mr-1"></i> Datasets | |
| </a> | |
| </div> | |
| <div class="mb-6"> | |
| <file-upload></file-upload> | |
| <label for="dataset" class="block text-sm font-medium text-gray-700 mb-2">Or enter manually (one sentence per line):</label> | |
| <textarea id="dataset" rows="5" class="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-purple-500 focus:border-purple-500" placeholder="Enter sample sentences here... | |
| Example: | |
| hello world | |
| how are you | |
| what is your name"></textarea> | |
| <div class="flex justify-end mt-2"> | |
| <button id="trainBtn" class="px-4 py-2 bg-purple-600 text-white rounded-md hover:bg-purple-700 focus:outline-none focus:ring-2 focus:ring-purple-500 focus:ring-offset-2 flex items-center"> | |
| <i data-feather="cpu" class="mr-2"></i> Train Model | |
| </button> | |
| </div> | |
| </div> | |
| <div id="modelControls" class="hidden space-y-6 border-t pt-6"> | |
| <div> | |
| <label for="inputWord" class="block text-sm font-medium text-gray-700 mb-2">Enter a typo to fix:</label> | |
| <div class="flex space-x-2"> | |
| <input id="inputWord" type="text" class="flex-1 px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-purple-500 focus:border-purple-500" placeholder="wsa, helo, waht, etc."> | |
| <button id="predictBtn" class="px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 flex items-center"> | |
| <i data-feather="wand" class="mr-2"></i> Predict | |
| </button> | |
| </div> | |
| </div> | |
| <div id="resultContainer" class="hidden rounded-lg bg-purple-50 p-4"> | |
| <h3 class="text-sm font-medium text-purple-800 mb-2 flex items-center"> | |
| <i data-feather="info" class="mr-2"></i> Prediction Result | |
| </h3> | |
| <p id="resultText" class="text-purple-900"></p> | |
| </div> | |
| <div id="vocabularyContainer" class="rounded-lg bg-blue-50 p-4"> | |
| <div class="flex justify-between items-center mb-2"> | |
| <h3 class="text-sm font-medium text-blue-800 flex items-center"> | |
| <i data-feather="book" class="mr-2"></i> Learned Vocabulary | |
| </h3> | |
| <span id="wordCount" class="text-xs bg-blue-200 text-blue-800 px-2 py-1 rounded-full">0 words</span> | |
| </div> | |
| <div id="vocabularyList" class="flex flex-wrap gap-2"> | |
| <!-- Words will appear here --> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="max-w-2xl mx-auto mt-8 text-center text-sm text-gray-500"> | |
| <p>Enter some sentences, train the model, then test it by entering common typos.</p> | |
| <p>The neural network will try to predict the correct word based on letter patterns.</p> | |
| </div> | |
| </div> | |
| <script src="components/navbar.js"></script> | |
| <script src="components/footer.js"></script> | |
| <script src="components/file-upload.js"></script> | |
| <script src="script.js"></script> | |
| <custom-footer></custom-footer> | |
| <script>feather.replace();</script> | |
| <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script> | |
| </body> | |
| </html> |