Spaces:
Running
Running
Made ssr mode True again, added Interface to an object
Browse files
app.py
CHANGED
|
@@ -136,7 +136,7 @@ def predict(image:Image):
|
|
| 136 |
return masked_image, re_image, predicted_labels
|
| 137 |
|
| 138 |
|
| 139 |
-
gr.Interface(
|
| 140 |
fn=predict,
|
| 141 |
inputs=gr.Image(type='pil', label='Input Image'),
|
| 142 |
outputs=[
|
|
@@ -147,4 +147,5 @@ gr.Interface(
|
|
| 147 |
title="Emotion Recognition and MAE Reconstruction",
|
| 148 |
description="Upload an image to see the reconstructed image (by MAE) and the predicted emotion label."
|
| 149 |
)
|
| 150 |
-
|
|
|
|
|
|
| 136 |
return masked_image, re_image, predicted_labels
|
| 137 |
|
| 138 |
|
| 139 |
+
demo = gr.Interface(
|
| 140 |
fn=predict,
|
| 141 |
inputs=gr.Image(type='pil', label='Input Image'),
|
| 142 |
outputs=[
|
|
|
|
| 147 |
title="Emotion Recognition and MAE Reconstruction",
|
| 148 |
description="Upload an image to see the reconstructed image (by MAE) and the predicted emotion label."
|
| 149 |
)
|
| 150 |
+
|
| 151 |
+
demo.launch(share=True, debug=True)
|