akhaliq HF Staff commited on
Commit
1a76563
·
verified ·
1 Parent(s): 196f698

Upload index.html with huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +87 -21
index.html CHANGED
@@ -1,29 +1,95 @@
1
  <!DOCTYPE html>
2
  <html lang="en">
3
-
4
  <head>
5
- <meta charset="UTF-8" />
6
- <link rel="stylesheet" href="style.css" />
7
-
8
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
9
- <title>Transformers.js - Object Detection</title>
 
 
 
10
  </head>
11
-
12
  <body>
13
- <h1>Object Detection w/ 🤗 Transformers.js</h1>
14
- <label id="container" for="upload">
15
- <svg width="25" height="25" viewBox="0 0 25 25" fill="none" xmlns="http://www.w3.org/2000/svg">
16
- <path fill="#000"
17
- d="M3.5 24.3a3 3 0 0 1-1.9-.8c-.5-.5-.8-1.2-.8-1.9V2.9c0-.7.3-1.3.8-1.9.6-.5 1.2-.7 2-.7h18.6c.7 0 1.3.2 1.9.7.5.6.7 1.2.7 2v18.6c0 .7-.2 1.4-.7 1.9a3 3 0 0 1-2 .8H3.6Zm0-2.7h18.7V2.9H3.5v18.7Zm2.7-2.7h13.3c.3 0 .5 0 .6-.3v-.7l-3.7-5a.6.6 0 0 0-.6-.2c-.2 0-.4 0-.5.3l-3.5 4.6-2.4-3.3a.6.6 0 0 0-.6-.3c-.2 0-.4.1-.5.3l-2.7 3.6c-.1.2-.2.4 0 .7.1.2.3.3.6.3Z">
18
- </path>
19
- </svg>
20
- Click to upload image
21
- <label id="example">(or try example)</label>
22
- </label>
23
- <label id="status">Loading model...</label>
24
- <input id="upload" type="file" accept="image/*" />
25
 
26
- <script src="index.js" type="module"></script>
27
- </body>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  </html>
 
1
  <!DOCTYPE html>
2
  <html lang="en">
 
3
  <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>Supertonic TTS - Text to Speech</title>
7
+ <link rel="stylesheet" href="style.css">
8
+ <script type="module">
9
+ import { pipeline } from 'https://cdn.jsdelivr.net/npm/@huggingface/transformers@3.8.0';
10
+ window.pipeline = pipeline;
11
+ </script>
12
  </head>
 
13
  <body>
14
+ <div class="container">
15
+ <header>
16
+ <div class="header-content">
17
+ <h1>🎙️ Supertonic TTS</h1>
18
+ <p>Transform text to natural speech using cutting-edge AI</p>
19
+ <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="anycoder-badge" aria-label="Built with anycoder">
20
+ Built with anycoder
21
+ </a>
22
+ </div>
23
+ </header>
 
 
24
 
25
+ <main class="main-content">
26
+ <div class="controls">
27
+ <div class="input-section">
28
+ <label for="textInput" class="sr-only">Enter text to convert to speech</label>
29
+ <textarea
30
+ id="textInput"
31
+ placeholder="Type your text here... (e.g., 'Hello, this is a test of the Supertonic TTS system!')"
32
+ rows="4"
33
+ maxlength="500"
34
+ ></textarea>
35
+ <div class="input-info">
36
+ <span id="charCount">0/500</span>
37
+ </div>
38
+ </div>
39
+
40
+ <div class="voice-section">
41
+ <label for="voiceSelect" class="voice-label">Voice:</label>
42
+ <select id="voiceSelect">
43
+ <option value="F1">Female 1</option>
44
+ <option value="F2">Female 2</option>
45
+ <option value="M1">Male 1</option>
46
+ <option value="M2">Male 2</option>
47
+ </select>
48
+ </div>
49
 
50
+ <div class="device-section">
51
+ <label class="device-toggle-label">
52
+ <input type="checkbox" id="deviceToggle" />
53
+ <span class="toggle-switch">
54
+ <span class="toggle-knob"></span>
55
+ </span>
56
+ <span class="toggle-text">
57
+ <span id="deviceText">CPU Mode</span>
58
+ </span>
59
+ </label>
60
+ </div>
61
+
62
+ <button id="generateBtn" class="generate-btn" disabled>
63
+ <span class="btn-content">
64
+ <span class="btn-text">Generate Speech</span>
65
+ <div class="spinner" style="display: none;"></div>
66
+ </span>
67
+ </button>
68
+ </div>
69
+
70
+ <div id="status" class="status hidden"></div>
71
+
72
+ <div id="audioSection" class="audio-section hidden">
73
+ <div class="audio-controls">
74
+ <button id="playBtn" class="play-btn" aria-label="Play audio">
75
+ <svg viewBox="0 0 24 24" fill="currentColor">
76
+ <path d="M8 5v14l11-7z"/>
77
+ </svg>
78
+ </button>
79
+ <button id="downloadBtn" class="download-btn" aria-label="Download audio" disabled>
80
+ <svg viewBox="0 0 24 24" fill="currentColor">
81
+ <path d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"/>
82
+ </svg>
83
+ </button>
84
+ <button id="regenerateBtn" class="regenerate-btn" aria-label="Generate new audio">
85
+ 🔄 New Audio
86
+ </button>
87
+ </div>
88
+ <audio id="audioPlayer" preload="metadata"></audio>
89
+ </div>
90
+ </main>
91
+ </div>
92
+
93
+ <script type="module" src="index.js"></script>
94
+ </body>
95
  </html>