Spaces:
Build error
Build error
Matyáš Boháček
commited on
Commit
•
ac2a7ce
1
Parent(s):
7c35b16
Add new logo, add examples
Browse files
app.py
CHANGED
@@ -104,9 +104,11 @@ def greet(label, video0, video1):
|
|
104 |
|
105 |
|
106 |
label = gr.outputs.Label(num_top_classes=3, label="Top class probabilities")
|
107 |
-
demo = gr.Interface(fn=greet, inputs=[gr.Dropdown(["Webcam", "Video"], label="
|
108 |
-
title="
|
109 |
description="""
|
|
|
|
|
110 |
<details>
|
111 |
<summary style="font-family: MonumentExpanded; font-size: 1em !important;" class="unselectable">
|
112 |
Instructions
|
@@ -129,93 +131,13 @@ demo = gr.Interface(fn=greet, inputs=[gr.Dropdown(["Webcam", "Video"], label="Pl
|
|
129 |
</details>
|
130 |
""",
|
131 |
article="by [Matyáš Boháček](https://www.matyasbohacek.com)",
|
132 |
-
css="""
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
@font-face {
|
140 |
-
font-family: Graphik;
|
141 |
-
font-weight: bold;
|
142 |
-
src: url("https://www.signlanguagerecognition.com/supplementary/GraphikBold.otf") format("opentype");
|
143 |
-
}
|
144 |
-
|
145 |
-
@font-face {
|
146 |
-
font-family: MonumentExpanded;
|
147 |
-
font-weight: regular;
|
148 |
-
src: url("https://www.signlanguagerecognition.com/supplementary/MonumentExtended-Regular.otf") format("opentype");
|
149 |
-
}
|
150 |
-
|
151 |
-
@font-face {
|
152 |
-
font-family: MonumentExpanded;
|
153 |
-
font-weight: bold;
|
154 |
-
src: url("https://www.signlanguagerecognition.com/supplementary/MonumentExtended-Ultrabold.otf") format("opentype");
|
155 |
-
}
|
156 |
-
|
157 |
-
html {
|
158 |
-
font-family: "Graphik";
|
159 |
-
}
|
160 |
-
|
161 |
-
h1 {
|
162 |
-
font-family: "MonumentExpanded";
|
163 |
-
}
|
164 |
-
|
165 |
-
#12 {
|
166 |
-
- background-image: linear-gradient(to left, #61D836, #6CB346) !important;
|
167 |
-
background-color: #61D836 !important;
|
168 |
-
}
|
169 |
-
|
170 |
-
#12:hover {
|
171 |
-
- background-image: linear-gradient(to left, #61D836, #6CB346) !important;
|
172 |
-
background-color: #6CB346 !important;
|
173 |
-
border: 0 !important;
|
174 |
-
border-color: 0 !important;
|
175 |
-
}
|
176 |
-
|
177 |
-
.dark .gr-button-primary {
|
178 |
-
--tw-gradient-from: #61D836;
|
179 |
-
--tw-gradient-to: #6CB346;
|
180 |
-
border: 0 !important;
|
181 |
-
border-color: 0 !important;
|
182 |
-
}
|
183 |
-
|
184 |
-
.dark .gr-button-primary:hover {
|
185 |
-
--tw-gradient-from: #64A642;
|
186 |
-
--tw-gradient-to: #58933B;
|
187 |
-
border: 0 !important;
|
188 |
-
border-color: 0 !important;
|
189 |
-
}
|
190 |
-
|
191 |
-
.gr-prose li {
|
192 |
-
margin-top: 0 !important;
|
193 |
-
margin-bottom: 0 !important;
|
194 |
-
}
|
195 |
-
|
196 |
-
.gr-prose ol ol, .gr-prose ol ul, .gr-prose ul ol, .gr-prose ul ul {
|
197 |
-
margin-top: 0 !important;
|
198 |
-
margin-bottom: 0 !important;
|
199 |
-
}
|
200 |
-
|
201 |
-
.gr-prose h1 {
|
202 |
-
font-size: 1.75em !important;
|
203 |
-
text-align: left !important;
|
204 |
-
}
|
205 |
-
|
206 |
-
.unselectable {
|
207 |
-
-webkit-user-select: none;
|
208 |
-
-moz-user-select: none;
|
209 |
-
-ms-user-select: none;
|
210 |
-
user-select: none;
|
211 |
-
}
|
212 |
-
|
213 |
-
footer {
|
214 |
-
opacity: 0 !important;
|
215 |
-
alpha: 0 !important;
|
216 |
-
}
|
217 |
-
""",
|
218 |
-
cache_examples=True
|
219 |
)
|
220 |
|
221 |
demo.launch(debug=True)
|
|
|
104 |
|
105 |
|
106 |
label = gr.outputs.Label(num_top_classes=3, label="Top class probabilities")
|
107 |
+
demo = gr.Interface(fn=greet, inputs=[gr.Dropdown(["Webcam", "Video"], label="Input source", type="value"), gr.Video(source="webcam", label="Webcam recording", type="mp4"), gr.Video(source="upload", label="Video upload", type="mp4")], outputs=label,
|
108 |
+
title="",
|
109 |
description="""
|
110 |
+
<img src="https://www.signlanguagerecognition.com/spoter-logo.png" style="width: 120px; margin-left: -5px;">
|
111 |
+
<h1 style="margin-top: -20px; color: #F7B832;">ASL Recognition Demo</h1>
|
112 |
<details>
|
113 |
<summary style="font-family: MonumentExpanded; font-size: 1em !important;" class="unselectable">
|
114 |
Instructions
|
|
|
131 |
</details>
|
132 |
""",
|
133 |
article="by [Matyáš Boháček](https://www.matyasbohacek.com)",
|
134 |
+
css="""styles.css""",
|
135 |
+
cache_examples=True,
|
136 |
+
examples=[
|
137 |
+
["Video", None, "examples/chair.mp4"],
|
138 |
+
["Video", None, "examples/computer.mp4"],
|
139 |
+
["Video", None, "examples/work.mp4"]
|
140 |
+
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
141 |
)
|
142 |
|
143 |
demo.launch(debug=True)
|