File size: 2,901 Bytes
ab9f226
dd1b723
 
 
35be6b2
 
 
 
dd1b723
 
 
35be6b2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dd1b723
35be6b2
dd1b723
 
 
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
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>AI Chat Assistant</title>
  <link rel="stylesheet" href="style.css">
</head>

<body>
  <div class="container">
    <header>
      <div class="header-content">
        <div class="logo">
          <svg width="32" height="32" viewBox="0 0 32 32" fill="none">
            <circle cx="16" cy="16" r="14" stroke="currentColor" stroke-width="2" />
            <path d="M12 16L15 19L20 13" stroke="currentColor" stroke-width="2" stroke-linecap="round"
              stroke-linejoin="round" />
          </svg>
          <h1>AI Assistant</h1>
        </div>
        <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="built-with">
          Built with anycoder
        </a>
      </div>
    </header>

    <div class="chat-container">
      <div id="loading-screen" class="loading-screen">
        <div class="loading-content">
          <div class="spinner"></div>
          <h2>Loading AI Model</h2>
          <p id="loading-status">Initializing...</p>
          <div class="progress-bar">
            <div id="progress-fill" class="progress-fill"></div>
          </div>
          <p class="loading-info">This may take a moment on first load</p>
        </div>
      </div>

      <div id="chat-area" class="chat-area" style="display: none;">
        <div id="messages" class="messages">
          <div class="message assistant-message welcome-message">
            <div class="message-avatar assistant-avatar">
              <svg width="20" height="20" viewBox="0 0 20 20" fill="none">
                <circle cx="10" cy="10" r="8" fill="currentColor" />
              </svg>
            </div>
            <div class="message-content">
              <div class="message-header">AI Assistant</div>
              <div class="message-text">Hello! I'm your AI assistant powered by Gemma. How can I help you today?</div>
            </div>
          </div>
        </div>

        <div class="input-area">
          <div class="input-container">
            <textarea
                            id="user-input"
                            placeholder="Message AI Assistant..."
                            rows="1"
                        ></textarea>
            <button id="send-button" class="send-button" disabled>
                            <svg width="20" height="20" viewBox="0 0 20 20" fill="none">
                                <path d="M18 10L2 2L5 10L2 18L18 10Z" fill="currentColor"/>
                            </svg>
                        </button>
          </div>
          <div class="input-footer">
            <span class="model-info">Gemma 270M • Press Enter to send</span>
          </div>
        </div>
      </div>
    </div>
  </div>

  <script type="module" src="index.js"></script>
</body>

</html>