File size: 3,932 Bytes
d2fe6cc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>ChatWithDoc - Chat with Your Documents</title>
    <link rel="stylesheet" href="css/styles.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
</head>
<body>
    <div class="container">
        <header>
            <h1><i class="fas fa-robot"></i> ChatWithDoc</h1>
            <p>Upload documents or enter URLs, then chat with your content using AI</p>
        </header>

        <div class="app-container">
            <div class="input-section">
                <h2 class="section-title"><i class="fas fa-file-upload"></i> Upload Documents</h2>
                
                <div class="upload-area" id="uploadArea">
                    <i class="fas fa-cloud-upload-alt"></i>
                    <h3>Drag & Drop Files Here</h3>
                    <p>Supports PDF, DOC, DOCX, TXT files</p>
                    <button class="btn btn-outline">Browse Files</button>
                    <input type="file" id="fileInput" multiple accept=".pdf,.doc,.docx,.txt" style="display: none;">
                    
                    <div class="file-types">
                        <div class="file-type">PDF</div>
                        <div class="file-type">DOC</div>
                        <div class="file-type">DOCX</div>
                        <div class="file-type">TXT</div>
                    </div>
                </div>
                
                <div class="file-list" id="fileList">
                    <!-- File items will be added here dynamically -->
                </div>
                
                <div class="url-input">
                    <label for="urlInput"><i class="fas fa-link"></i> Or Enter a Web Page URL</label>
                    <input type="url" id="urlInput" placeholder="https://example.com/article">
                </div>
                
                <button class="btn btn-block pulse" id="processBtn">
                    <i class="fas fa-cogs"></i> Process Documents & URLs
                </button>
            </div>
            
            <div class="chat-section">
                <div class="chat-header">
                    <img src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%234361ee' d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 15h-2v-6h2v6zm3 0h-2v-6h2v6zm3 0h-2v-6h2v6z'/%3E%3C/svg%3E" alt="AI Assistant">
                    <div>
                        <h2>ChatWithDoc Assistant</h2>
                        <p>Ask me anything about your documents</p>
                    </div>
                </div>
                
                <div class="chat-messages" id="chatMessages">
                    <div class="message bot-message">
                        <div class="message-header">
                            <i class="fas fa-robot"></i> ChatWithDoc Assistant
                        </div>
                        <div class="message-content">
                            Hello! I'm your document assistant. Upload some documents or enter URLs, then ask me anything about their content. I'll help you find answers quickly.
                        </div>
                    </div>
                </div>
                

                
                <div class="chat-input">
                    <input type="text" id="messageInput" placeholder="Ask about your documents...">
                    <button id="sendButton">
                        <i class="fas fa-paper-plane"></i>
                    </button>
                </div>
            </div>
        </div>
        
        <footer>
            <p>ChatWithDoc - Chat with your documents using AI</p>
        </footer>
    </div>

    <script src="js/main.js"></script>
</body>
</html>