Spaces:
Runtime error
Runtime error
Nik Ska
commited on
Commit
•
5e81fde
1
Parent(s):
b1eb7e0
rollback
Browse files
app.py
CHANGED
@@ -51,9 +51,9 @@ def get_mask(img_in):
|
|
51 |
|
52 |
img_in = Image.alpha_composite(bg_img, img_in)
|
53 |
|
54 |
-
return (img_in, result['emotion']
|
55 |
else:
|
56 |
-
|
57 |
|
58 |
|
59 |
footer = r"""
|
@@ -73,10 +73,9 @@ with gr.Blocks(title="Face Shine") as app:
|
|
73 |
run_btn = gr.Button(variant="primary")
|
74 |
with gr.Column():
|
75 |
output_img = gr.Image(type="pil", label="result")
|
76 |
-
error = gr.Textbox(label="Error")
|
77 |
emotion = gr.Label(label="emotion")
|
78 |
|
79 |
-
run_btn.click(get_mask, [input_img], [output_img, emotion
|
80 |
|
81 |
with gr.Row():
|
82 |
gr.HTML(footer)
|
|
|
51 |
|
52 |
img_in = Image.alpha_composite(bg_img, img_in)
|
53 |
|
54 |
+
return (img_in, result['emotion'])
|
55 |
else:
|
56 |
+
print('error:', response.text)
|
57 |
|
58 |
|
59 |
footer = r"""
|
|
|
73 |
run_btn = gr.Button(variant="primary")
|
74 |
with gr.Column():
|
75 |
output_img = gr.Image(type="pil", label="result")
|
|
|
76 |
emotion = gr.Label(label="emotion")
|
77 |
|
78 |
+
run_btn.click(get_mask, [input_img], [output_img, emotion])
|
79 |
|
80 |
with gr.Row():
|
81 |
gr.HTML(footer)
|