Spaces:
Running
Running
Upload 3 files
Browse files- README.md +5 -8
- index.html +10 -25
- style.css +18 -66
README.md
CHANGED
|
@@ -1,13 +1,10 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
-
models:
|
| 9 |
-
- Xenova/detr-resnet-50
|
| 10 |
-
short_description: text to speech on web browser
|
| 11 |
---
|
| 12 |
|
| 13 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
---
|
| 2 |
+
title: Text To Speech Client
|
| 3 |
+
emoji: π
|
| 4 |
+
colorFrom: red
|
| 5 |
+
colorTo: red
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
|
@@ -1,29 +1,14 @@
|
|
| 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 -
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
<
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 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>Transformers.js - Text-to-speech demo</title>
|
| 7 |
+
<script type="module" crossorigin src="/assets/index-77d0c996.js"></script>
|
| 8 |
+
<link rel="stylesheet" href="/assets/index-5644c887.css">
|
| 9 |
+
</head>
|
| 10 |
+
<body>
|
| 11 |
+
<div id="root"></div>
|
| 12 |
+
|
| 13 |
+
</body>
|
| 14 |
+
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
style.css
CHANGED
|
@@ -1,76 +1,28 @@
|
|
| 1 |
-
* {
|
| 2 |
-
box-sizing: border-box;
|
| 3 |
-
padding: 0;
|
| 4 |
-
margin: 0;
|
| 5 |
-
font-family: sans-serif;
|
| 6 |
-
}
|
| 7 |
-
|
| 8 |
-
html,
|
| 9 |
-
body {
|
| 10 |
-
height: 100%;
|
| 11 |
-
}
|
| 12 |
-
|
| 13 |
body {
|
| 14 |
-
|
|
|
|
| 15 |
}
|
| 16 |
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
flex-direction: column;
|
| 21 |
-
justify-content: center;
|
| 22 |
-
align-items: center;
|
| 23 |
}
|
| 24 |
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
height: 640px;
|
| 31 |
-
max-width: 100%;
|
| 32 |
-
max-height: 100%;
|
| 33 |
-
|
| 34 |
-
border: 2px dashed #D1D5DB;
|
| 35 |
-
border-radius: 0.75rem;
|
| 36 |
-
overflow: hidden;
|
| 37 |
-
cursor: pointer;
|
| 38 |
-
margin: 1rem;
|
| 39 |
-
|
| 40 |
-
background-size: 100% 100%;
|
| 41 |
-
background-position: center;
|
| 42 |
-
background-repeat: no-repeat;
|
| 43 |
-
font-size: 18px;
|
| 44 |
}
|
| 45 |
|
| 46 |
-
|
| 47 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
}
|
| 49 |
|
| 50 |
-
|
| 51 |
-
|
| 52 |
}
|
| 53 |
-
|
| 54 |
-
#example {
|
| 55 |
-
font-size: 14px;
|
| 56 |
-
text-decoration: underline;
|
| 57 |
-
cursor: pointer;
|
| 58 |
-
}
|
| 59 |
-
|
| 60 |
-
#example:hover {
|
| 61 |
-
color: #2563EB;
|
| 62 |
-
}
|
| 63 |
-
|
| 64 |
-
.bounding-box {
|
| 65 |
-
position: absolute;
|
| 66 |
-
box-sizing: border-box;
|
| 67 |
-
border: solid 2px;
|
| 68 |
-
}
|
| 69 |
-
|
| 70 |
-
.bounding-box-label {
|
| 71 |
-
color: white;
|
| 72 |
-
position: absolute;
|
| 73 |
-
font-size: 12px;
|
| 74 |
-
margin: -16px 0 0 -2px;
|
| 75 |
-
padding: 1px;
|
| 76 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
body {
|
| 2 |
+
padding: 2rem;
|
| 3 |
+
font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
|
| 4 |
}
|
| 5 |
|
| 6 |
+
h1 {
|
| 7 |
+
font-size: 16px;
|
| 8 |
+
margin-top: 0;
|
|
|
|
|
|
|
|
|
|
| 9 |
}
|
| 10 |
|
| 11 |
+
p {
|
| 12 |
+
color: rgb(107, 114, 128);
|
| 13 |
+
font-size: 15px;
|
| 14 |
+
margin-bottom: 10px;
|
| 15 |
+
margin-top: 5px;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
}
|
| 17 |
|
| 18 |
+
.card {
|
| 19 |
+
max-width: 620px;
|
| 20 |
+
margin: 0 auto;
|
| 21 |
+
padding: 16px;
|
| 22 |
+
border: 1px solid lightgray;
|
| 23 |
+
border-radius: 16px;
|
| 24 |
}
|
| 25 |
|
| 26 |
+
.card p:last-child {
|
| 27 |
+
margin-bottom: 0;
|
| 28 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|