Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -68,6 +68,6 @@ def modelpred(img):
|
|
68 |
imgpath=gr.inputs.Image(type="filepath")
|
69 |
# webcam=gr.inputs.Image(source="webcam",type="filepath",optional=True)
|
70 |
iface = gr.Interface(fn=modelpred, inputs=imgpath, outputs=[gr.outputs.Image(type="pil"),"text"],title="Face Mask Detection using Deep Neural Networks",description="""Implementation of an efficient neural network to detect and differentiate between people with high accuracy into 3 classes - those who have correctly worn face masks, those who have worn masks incorrectly and those who have not worn them. Implemented and fine tuned a MobileNetV2 network for this task and achieved an accuracy of 92.02%.""",allow_flagging="never",live=False,examples=[["images-3.jpeg"],["power-family-with-father-mother-daughter-wearing-medical-face-mask-protect-2019-ncov-covid-19-corona-virus-stay-home-concept_73622-1419.jpg"],["3000-2.jpg"]])
|
71 |
-
model = keras.models.load_model('
|
72 |
faceCascade = cv2.CascadeClassifier(cv2.data.haarcascades + 'haarcascade_frontalface_alt2.xml')
|
73 |
iface.launch(debug=True)
|
|
|
68 |
imgpath=gr.inputs.Image(type="filepath")
|
69 |
# webcam=gr.inputs.Image(source="webcam",type="filepath",optional=True)
|
70 |
iface = gr.Interface(fn=modelpred, inputs=imgpath, outputs=[gr.outputs.Image(type="pil"),"text"],title="Face Mask Detection using Deep Neural Networks",description="""Implementation of an efficient neural network to detect and differentiate between people with high accuracy into 3 classes - those who have correctly worn face masks, those who have worn masks incorrectly and those who have not worn them. Implemented and fine tuned a MobileNetV2 network for this task and achieved an accuracy of 92.02%.""",allow_flagging="never",live=False,examples=[["images-3.jpeg"],["power-family-with-father-mother-daughter-wearing-medical-face-mask-protect-2019-ncov-covid-19-corona-virus-stay-home-concept_73622-1419.jpg"],["3000-2.jpg"]])
|
71 |
+
model = keras.models.load_model('saved_model.pb')
|
72 |
faceCascade = cv2.CascadeClassifier(cv2.data.haarcascades + 'haarcascade_frontalface_alt2.xml')
|
73 |
iface.launch(debug=True)
|