File size: 4,528 Bytes
1eaa5ce
 
 
ef0620c
 
 
 
 
 
1eaa5ce
 
ef0620c
 
 
 
 
 
 
 
 
 
 
 
 
 
1eaa5ce
 
ef0620c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1eaa5ce
 
ef0620c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1eaa5ce
 
ef0620c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1eaa5ce
 
ef0620c
 
 
1eaa5ce
 
 
ef0620c
1eaa5ce
ef0620c
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
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Local Inference Hub</title>
    <link rel="stylesheet" href="/static/css/styles.css">
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap" rel="stylesheet">
    <link href="https://cdn.jsdelivr.net/npm/[email protected]/fonts/remixicon.css" rel="stylesheet">
</head>
<body>
    <div class="sidebar">
        <div class="logo">LocalInference</div>
        <a href="#" class="nav-item active" data-tab="chat">
            <i class="ri-chat-3-line"></i>
            Chat Generation
        </a>
        <a href="#" class="nav-item" data-tab="summary">
            <i class="ri-file-text-line"></i>
            Text Summarization
        </a>
        <a href="#" class="nav-item" data-tab="image">
            <i class="ri-image-line"></i>
            Image Recognition
        </a>
    </div>

    <div class="main-content">
        <div id="chat" class="tab-content active">
            <div class="content-header">
                <h1>Chat Generation</h1>
                <p>Have a conversation with an AI assistant</p>
            </div>
            
            <div class="input-container">
                <button class="toggle-debug">
                    <i class="ri-bug-line"></i>
                    Toggle Word Predictions
                </button>
                <textarea id="chat-input" placeholder="Type your message here... (Press Enter to send)"></textarea>
                <div class="word-predictions" style="display: none;">
                    <h3>Word Predictions</h3>
                    <div class="predictions-content"></div>
                </div>
                <div class="button-container">
                    <button class="button" onclick="sendMessage()">
                        <i class="ri-send-plane-fill"></i>
                        Send Message
                    </button>
                </div>
            </div>
            <div id="chat-output"></div>
        </div>

        <div id="summary" class="tab-content">
            <div class="content-header">
                <h1>Text Summarization</h1>
                <p>Get a concise summary of your text</p>
            </div>
            
            <div class="input-container">
                <button class="toggle-debug">
                    <i class="ri-bug-line"></i>
                    Toggle Word Predictions
                </button>
                <textarea id="summary-input" placeholder="Paste your text here for summarization..."></textarea>
                <div class="word-predictions" style="display: none;">
                    <h3>Word Predictions</h3>
                    <div class="predictions-content"></div>
                </div>
                <div class="button-container">
                    <button class="button" onclick="generateSummary()">
                        <i class="ri-file-text-line"></i>
                        Generate Summary
                    </button>
                    <span class="keyboard-hint">Press Ctrl + Enter to generate summary</span>
                </div>
            </div>
            <div id="summary-output"></div>
        </div>

        <div id="image" class="tab-content">
            <div class="content-header">
                <h1>Image Recognition</h1>
                <p>Upload an image for AI analysis</p>
            </div>
            
            <div class="input-container">
                <div class="image-upload">
                    <input type="file" id="image-input" accept="image/*" capture="environment">
                    <i class="ri-image-add-line"></i>
                    <p>Drop an image here or click to upload</p>
                    <span class="keyboard-hint">Supported formats: JPG, PNG, GIF</span>
                </div>
                <img id="image-preview" class="image-preview" style="display: none;">
                <div class="button-container">
                    <button class="button" onclick="processImage()">
                        <i class="ri-image-line"></i>
                        Analyze Image
                    </button>
                </div>
            </div>
            <div id="image-output"></div>
        </div>

        <div id="loading">
            <div class="spinner"></div>
            <p>Processing...</p>
        </div>
    </div>

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