Spaces:
Sleeping
Sleeping
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Maize Crop RAG System</title> | |
| <link rel="stylesheet" href="/static/style.css"> | |
| </head> | |
| <body> | |
| <div class="container"> | |
| <header> | |
| <h1>π½ Maize Crop Intelligence System</h1> | |
| <p>AI-powered Q&A for Maize Agriculture</p> | |
| </header> | |
| <div class="status-bar" id="statusBar"> | |
| <span class="status-indicator" id="statusIndicator"></span> | |
| <span id="statusText">Checking system status...</span> | |
| <button id="statsBtn" class="stats-btn">π Token Stats</button> | |
| </div> | |
| <div class="init-section" id="initSection" style="display: none;"> | |
| <h3>Initialize System</h3> | |
| <input type="password" id="apiKeyInput" placeholder="Enter Google API Key"> | |
| <button id="initBtn">Initialize</button> | |
| </div> | |
| <div class="main-content" id="mainContent" style="display: none;"> | |
| <div class="query-section"> | |
| <h3>Ask About Maize</h3> | |
| <div class="input-group"> | |
| <textarea id="queryInput" placeholder="Ask your question about maize cultivation, pests, irrigation, soil, etc." rows="3"></textarea> | |
| <button id="submitBtn">Ask Question</button> | |
| </div> | |
| <div class="sample-queries"> | |
| <p>Sample questions:</p> | |
| <button class="sample-btn" data-query="What are the main pests affecting maize crops?">Pests</button> | |
| <button class="sample-btn" data-query="How should maize be irrigated?">Irrigation</button> | |
| <button class="sample-btn" data-query="What is the ideal soil type for maize?">Soil</button> | |
| <button class="sample-btn" data-query="What is the typical yield per acre?">Yield</button> | |
| </div> | |
| </div> | |
| <div class="results-section" id="resultsSection" style="display: none;"> | |
| <h3>Answer</h3> | |
| <div id="answerContent" class="answer-content"></div> | |
| <div class="metadata"> | |
| <div id="tokenInfo" class="token-info"></div> | |
| <div id="timeInfo" class="time-info"></div> | |
| </div> | |
| <div id="sourcesSection" class="sources-section" style="display: none;"> | |
| <h4>Sources</h4> | |
| <div id="sourcesList"></div> | |
| </div> | |
| </div> | |
| <div class="upload-section"> | |
| <h3>Upload New Document</h3> | |
| <input type="file" id="fileInput" accept=".txt"> | |
| <button id="uploadBtn">Upload & Reinitialize</button> | |
| </div> | |
| </div> | |
| <div class="loading" id="loading" style="display: none;"> | |
| <div class="spinner"></div> | |
| <p>Processing your query...</p> | |
| </div> | |
| <div class="stats-modal" id="statsModal" style="display: none;"> | |
| <div class="modal-content"> | |
| <span class="close">×</span> | |
| <h3>Token Usage Statistics</h3> | |
| <div id="statsContent"></div> | |
| </div> | |
| </div> | |
| </div> | |
| <script src="/static/script.js"></script> | |
| </body> | |
| </html> |