File size: 3,402 Bytes
ab9f226
dd1b723
 
 
108baee
 
 
 
 
dd1b723
 
 
108baee
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
dd1b723
108baee
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
82
83
84
85
86
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Gemma Chat - Apple Style</title>
  <link rel="stylesheet" href="styles.css">
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
</head>

<body>
  <div class="app-container">
    <header class="header">
      <div class="header-content">
        <div class="app-info">
          <h1 class="app-title">Gemma Chat</h1>
          <p class="app-subtitle">Powered by Google's Gemma-3 Model</p>
        </div>
        <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="built-with">
          Built with anycoder
        </a>
      </div>
    </header>

    <main class="chat-container">
      <div class="messages-wrapper">
        <div id="messages" class="messages">
          <div class="welcome-message">
            <div class="welcome-content">
              <div class="welcome-icon"></div>
              <h2>Welcome to Gemma Chat</h2>
              <p>I'm here to help! Ask me anything about science, technology, creative writing, or just have a
                conversation.</p>
              <div class="example-prompts">
                <p class="examples-title">Try asking:</p>
                <div class="example-chips">
                  <button class="example-chip" data-prompt="Explain quantum computing in simple terms">Explain quantum computing</button>
                  <button class="example-chip" data-prompt="Write a short story about time travel">Write a time travel story</button>
                  <button class="example-chip" data-prompt="What are the benefits of renewable energy?">Renewable energy benefits</button>
                  <button class="example-chip" data-prompt="Help me plan a healthy meal plan">Healthy meal plan</button>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>

      <div class="input-container">
        <div class="input-wrapper">
          <textarea
                        id="messageInput"
                        class="message-input"
                        placeholder="Type your message..."
                        rows="1"
                        disabled
                    ></textarea>
          <button id="sendButton" class="send-button" disabled>
                        <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                            <line x1="22" y1="2" x2="11" y2="13"></line>
                            <polygon points="22 2 15 22 11 13 2 9 22 2"></polygon>
                        </svg>
                    </button>
        </div>
        <div class="input-status">
          <span id="statusText">Initializing model...</span>
        </div>
      </div>
    </main>

    <div id="loadingOverlay" class="loading-overlay">
      <div class="loading-content">
        <div class="loading-spinner"></div>
        <h3>Loading Gemma-3 Model</h3>
        <p id="loadingProgress">Downloading model files...</p>
        <div class="progress-bar">
          <div id="progressFill" class="progress-fill"></div>
        </div>
      </div>
    </div>
  </div>

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

</html>