File size: 2,639 Bytes
ab9f226
dd1b723
 
 
adcae9a
 
 
 
dd1b723
 
 
adcae9a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dd1b723
adcae9a
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
<!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 class="header">
      <div class="header-content">
        <h1 class="title">AI Chat Assistant</h1>
        <p class="subtitle">Powered by Llama 3.2 1B</p>
      </div>
      <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="built-with">
        Built with anycoder
      </a>
    </header>

    <div class="chat-container">
      <div id="messages" class="messages-container">
        <div class="welcome-message">
          <div class="welcome-icon">
            <svg width="64" height="64" viewBox="0 0 64 64" fill="none">
              <circle cx="32" cy="32" r="32" fill="url(#gradient)" />
              <path d="M32 20v24M20 32h24" stroke="white" stroke-width="3" stroke-linecap="round" />
              <defs>
                <linearGradient id="gradient" x1="0" y1="0" x2="64" y2="64">
                  <stop offset="0%" style="stop-color:#007AFF" />
                  <stop offset="100%" style="stop-color:#5856D6" />
                </linearGradient>
              </defs>
            </svg>
          </div>
          <h2>Welcome to AI Chat</h2>
          <p>Start a conversation with your AI assistant. Ask questions, get creative, or just chat!</p>
        </div>
      </div>

      <div class="input-container">
        <div class="input-wrapper">
          <textarea
                        id="userInput"
                        placeholder="Message"
                        rows="1"
                        disabled
                    ></textarea>
          <button id="sendBtn" class="send-btn" disabled>
                        <svg width="20" height="20" viewBox="0 0 20 20" fill="none">
                            <path d="M2 10L18 2L10 18L8 11L2 10Z" fill="currentColor"/>
                        </svg>
                    </button>
        </div>
        <div id="status" class="status">Initializing...</div>
      </div>
    </div>
  </div>

  <div id="loadingOverlay" class="loading-overlay">
    <div class="loading-content">
      <div class="loading-spinner"></div>
      <h3>Loading AI Model</h3>
      <p id="loadingText">Preparing your assistant...</p>
      <div class="progress-bar">
        <div id="progressFill" class="progress-fill"></div>
      </div>
      <p id="progressText" class="progress-text">0%</p>
    </div>
  </div>

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

</html>