Spaces:
Runtime error
Runtime error
File size: 9,441 Bytes
e413948 |
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 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Studyson - Smart Document Assistant</title>
<link rel="stylesheet" href="/static/css/style.css">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
</head>
<body>
<div class="app-layout">
<!-- Sidebar Navigation -->
<aside class="sidebar">
<div class="logo-section">
<div class="logo-icon">
<svg width="40" height="40" viewBox="0 0 40 40" fill="none">
<rect width="40" height="40" rx="12" fill="url(#grad1)"/>
<path d="M12 14h16M12 20h16M12 26h10" stroke="white" stroke-width="2.5" stroke-linecap="round"/>
<defs>
<linearGradient id="grad1" x1="0" y1="0" x2="40" y2="40">
<stop offset="0%" stop-color="#667eea"/>
<stop offset="100%" stop-color="#764ba2"/>
</linearGradient>
</defs>
</svg>
</div>
<h1 class="logo-text">Studyson</h1>
</div>
<nav class="nav-menu">
<button class="nav-item active" data-view="upload">
<span class="nav-icon">π</span>
<span class="nav-label">Upload Files</span>
</button>
<button class="nav-item" data-view="web">
<span class="nav-icon">π</span>
<span class="nav-label">Web Import</span>
</button>
<button class="nav-item" data-view="chat">
<span class="nav-icon">π</span>
<span class="nav-label">Q&A Chat</span>
</button>
<button class="nav-item" data-view="summary">
<span class="nav-icon">π</span>
<span class="nav-label">Summarize</span>
</button>
</nav>
<div class="sidebar-footer">
<div class="stats-card">
<div class="stat-item">
<span class="stat-label">Documents</span>
<span class="stat-value" id="doc-count-sidebar">0</span>
</div>
<div class="stat-indicator">
<div class="pulse-dot" id="status-pulse"></div>
<span id="status-text-sidebar">Ready</span>
</div>
</div>
<button id="reset-btn-sidebar" class="btn-reset">
<span>ποΈ</span>
<span>Clear All</span>
</button>
</div>
</aside>
<!-- Main Content Area -->
<main class="main-content">
<div class="topbar">
<div class="breadcrumb">
<span class="breadcrumb-item" id="current-view-name">Upload Files</span>
</div>
<div class="topbar-actions">
<div class="status-badge" id="status-badge">
<span class="status-dot"></span>
<span id="status-text-top">System Ready</span>
</div>
</div>
</div>
<!-- Upload View -->
<div class="view-container active" id="view-upload">
<div class="view-header">
<h2 class="view-title">Upload PDF Documents</h2>
<p class="view-description">Import your PDF files to create a searchable knowledge base</p>
</div>
<div class="content-card">
<form id="upload-form" class="upload-area">
<input type="file" id="file-input" accept=".pdf" hidden>
<label for="file-input" class="drop-zone">
<div class="drop-zone-icon">π</div>
<h3 class="drop-zone-title" id="drop-zone-title">Drop your PDF here</h3>
<p class="drop-zone-desc">or click to browse files</p>
<div class="file-info" id="file-info" style="display: none;">
<span class="file-icon">π</span>
<span class="file-name-display" id="file-name-display"></span>
<span class="file-size" id="file-size-display"></span>
</div>
</label>
<button type="submit" class="btn-primary btn-large">
<span>Upload & Index Document</span>
<span class="btn-arrow">β</span>
</button>
</form>
<div id="upload-result" class="result-message"></div>
</div>
</div>
<!-- Web Scrape View -->
<div class="view-container" id="view-web">
<div class="view-header">
<h2 class="view-title">Import from Web</h2>
<p class="view-description">Extract and index content from any webpage</p>
</div>
<div class="content-card">
<form id="scrape-form" class="web-form">
<div class="input-group">
<span class="input-icon">π</span>
<input type="url" id="url-input" class="input-field" placeholder="https://example.com/article" required>
</div>
<button type="submit" class="btn-primary btn-large">
<span>Fetch & Index Content</span>
<span class="btn-arrow">β</span>
</button>
</form>
<div id="scrape-result" class="result-message"></div>
</div>
</div>
<!-- Chat View -->
<div class="view-container" id="view-chat">
<div class="view-header">
<h2 class="view-title">Interactive Q&A</h2>
<p class="view-description">Ask questions and get intelligent answers from your documents</p>
</div>
<div class="chat-container">
<div class="messages-area" id="chat-messages">
<div class="empty-state">
<div class="empty-icon">π¬</div>
<h3>Start a Conversation</h3>
<p>Ask me anything about your indexed documents</p>
</div>
</div>
<form id="chat-form" class="chat-input-area">
<div class="chat-input-wrapper">
<input type="text" id="question-input" class="chat-input" placeholder="Type your question here..." required>
<button type="submit" class="btn-send">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none">
<path d="M22 2L11 13M22 2l-7 20-4-9-9-4 20-7z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</button>
</div>
</form>
</div>
</div>
<!-- Summary View -->
<div class="view-container" id="view-summary">
<div class="view-header">
<h2 class="view-title">Document Summarization</h2>
<p class="view-description">Generate comprehensive summaries of your indexed content</p>
</div>
<div class="content-card">
<form id="summarize-form" class="summary-form">
<div class="form-group">
<label class="form-label">Summary Length</label>
<div class="slider-container">
<input type="range" id="max-length" class="range-slider" min="100" max="2000" step="100" value="500">
<div class="slider-value">
<span id="length-display">500</span> words
</div>
</div>
</div>
<button type="submit" class="btn-primary btn-large">
<span>Generate Summary</span>
<span class="btn-arrow">β¨</span>
</button>
</form>
<div id="summary-result" class="result-message summary-output"></div>
</div>
</div>
</main>
</div>
<script src="/static/js/app.js"></script>
</body>
</html>
|