eusholli commited on
Commit
8dff46f
·
1 Parent(s): 3332470

move/remove mtcnn initialization appropriately

Browse files
Files changed (2) hide show
  1. app.py +2 -3
  2. object_detection.py +0 -3
app.py CHANGED
@@ -40,6 +40,8 @@ result_queue: "queue.Queue[List[Detection]]" = queue.Queue()
40
 
41
  # Appropriate imports needed for analysis
42
 
 
 
43
 
44
  # Initialize the Hugging Face pipeline for facial emotion detection
45
  emotion_pipeline = pipeline("image-classification",
@@ -157,9 +159,6 @@ logging.getLogger("streamlit").setLevel(logging.ERROR)
157
  # Container to hold image data and analysis results
158
  img_container = {"input": None, "analyzed": None, "analysis_time": None}
159
 
160
- # Initialize MTCNN for face detection
161
- mtcnn = MTCNN()
162
-
163
  # Logger for debugging and information
164
  logger = logging.getLogger(__name__)
165
 
 
40
 
41
  # Appropriate imports needed for analysis
42
 
43
+ # Initialize MTCNN for face detection
44
+ mtcnn = MTCNN()
45
 
46
  # Initialize the Hugging Face pipeline for facial emotion detection
47
  emotion_pipeline = pipeline("image-classification",
 
159
  # Container to hold image data and analysis results
160
  img_container = {"input": None, "analyzed": None, "analysis_time": None}
161
 
 
 
 
162
  # Logger for debugging and information
163
  logger = logging.getLogger(__name__)
164
 
object_detection.py CHANGED
@@ -192,9 +192,6 @@ logging.getLogger("streamlit").setLevel(logging.ERROR)
192
  # Container to hold image data and analysis results
193
  img_container = {"input": None, "analyzed": None, "analysis_time": None}
194
 
195
- # Initialize MTCNN for face detection
196
- mtcnn = MTCNN()
197
-
198
  # Logger for debugging and information
199
  logger = logging.getLogger(__name__)
200
 
 
192
  # Container to hold image data and analysis results
193
  img_container = {"input": None, "analyzed": None, "analysis_time": None}
194
 
 
 
 
195
  # Logger for debugging and information
196
  logger = logging.getLogger(__name__)
197