prekshyam commited on
Commit
14adcb6
·
verified ·
1 Parent(s): c444ecc

Made ssr mode True again, added Interface to an object

Browse files
Files changed (1) hide show
  1. app.py +3 -2
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
- launch(share=True, debug=True, ssr_mode=False)
 
 
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)