Spaces:
Sleeping
Sleeping
Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
|
@@ -320,7 +320,7 @@ HOW_HTML = """
|
|
| 320 |
# ββ build Gradio app βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 321 |
|
| 322 |
def build_app() -> gr.Blocks:
|
| 323 |
-
with gr.Blocks(
|
| 324 |
|
| 325 |
gr.HTML(HERO_HTML)
|
| 326 |
|
|
@@ -331,12 +331,11 @@ def build_app() -> gr.Blocks:
|
|
| 331 |
gr.HTML(HOW_HTML)
|
| 332 |
|
| 333 |
image_input = gr.Image(
|
| 334 |
-
sources
|
| 335 |
-
type
|
| 336 |
-
label
|
| 337 |
-
height
|
| 338 |
-
|
| 339 |
-
show_label = True,
|
| 340 |
)
|
| 341 |
|
| 342 |
analyze_btn = gr.Button(
|
|
@@ -411,5 +410,6 @@ if __name__ == "__main__":
|
|
| 411 |
app.launch(
|
| 412 |
server_name = "0.0.0.0",
|
| 413 |
server_port = int(os.environ.get("PORT", 7860)),
|
|
|
|
| 414 |
share = True, # creates a public gradio.live tunnel URL
|
| 415 |
)
|
|
|
|
| 320 |
# ββ build Gradio app βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 321 |
|
| 322 |
def build_app() -> gr.Blocks:
|
| 323 |
+
with gr.Blocks(title="FaceInsight_AI") as demo:
|
| 324 |
|
| 325 |
gr.HTML(HERO_HTML)
|
| 326 |
|
|
|
|
| 331 |
gr.HTML(HOW_HTML)
|
| 332 |
|
| 333 |
image_input = gr.Image(
|
| 334 |
+
sources = ["webcam", "upload"],
|
| 335 |
+
type = "numpy",
|
| 336 |
+
label = "π· Camera / Upload",
|
| 337 |
+
height = 360,
|
| 338 |
+
show_label = True,
|
|
|
|
| 339 |
)
|
| 340 |
|
| 341 |
analyze_btn = gr.Button(
|
|
|
|
| 410 |
app.launch(
|
| 411 |
server_name = "0.0.0.0",
|
| 412 |
server_port = int(os.environ.get("PORT", 7860)),
|
| 413 |
+
css = CSS,
|
| 414 |
share = True, # creates a public gradio.live tunnel URL
|
| 415 |
)
|