File size: 2,569 Bytes
ab9f226
dd1b723
 
 
42b6b95
 
 
 
 
 
dd1b723
 
 
42b6b95
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dd1b723
42b6b95
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
<!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">
  <link href="https://fonts.googleapis.com/css2?family=SF+Pro+Display:wght@300;400;500;600;700&display=swap"
    rel="stylesheet">
</head>

<body>
  <div class="container">
    <!-- Header -->
    <header class="header">
      <div class="header-content">
        <h1 class="title">
          <span class="gradient-text">AI Chat</span>
        </h1>
        <p class="subtitle">Powered by Gemma 3 270M</p>
      </div>
      <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="built-with">
        Built with anycoder
      </a>
    </header>

    <!-- Model Status -->
    <div id="modelStatus" class="model-status">
      <div class="status-content">
        <div class="loader"></div>
        <span id="statusText">Initializing model...</span>
      </div>
      <div id="progressBar" class="progress-bar">
        <div id="progressFill" class="progress-fill"></div>
      </div>
    </div>

    <!-- Chat Container -->
    <div class="chat-container">
      <div id="chatMessages" class="chat-messages">
        <div class="welcome-message">
          <div class="welcome-icon">💬</div>
          <h2>Welcome to AI Chat</h2>
          <p>Start a conversation by typing a message below. I'm here to help!</p>
        </div>
      </div>

      <!-- Input Area -->
      <div class="input-container">
        <div class="input-wrapper">
          <textarea
                        id="userInput"
                        class="user-input"
                        placeholder="Type your message..."
                        rows="1"
                        disabled
                    ></textarea>
          <button id="sendButton" class="send-button" disabled>
                        <svg width="24" height="24" viewBox="0 0 24 24" fill="none">
                            <path d="M22 2L11 13" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
                            <path d="M22 2L15 22L11 13L2 9L22 2Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
                        </svg>
                    </button>
        </div>
        <div class="input-hint">
          Press Enter to send • Shift+Enter for new line
        </div>
      </div>
    </div>
  </div>

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

</html>