Update app.py
Browse files
app.py
CHANGED
|
@@ -133,7 +133,19 @@ def video_frame_callback(frame):
|
|
| 133 |
|
| 134 |
return av.VideoFrame.from_ndarray(ann, format="bgr24")
|
| 135 |
|
| 136 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 137 |
source = "Webcam"
|
| 138 |
recog = True
|
| 139 |
|
|
@@ -171,7 +183,7 @@ with stream:
|
|
| 171 |
use_container_width= False
|
| 172 |
)
|
| 173 |
img = np.array(Image.open(frame))
|
| 174 |
-
pic.image(image_processing(img),
|
| 175 |
|
| 176 |
|
| 177 |
recog = st.toggle(":green[Emotion recogntion]", key = "stream", value = True)
|
|
|
|
| 133 |
|
| 134 |
return av.VideoFrame.from_ndarray(ann, format="bgr24")
|
| 135 |
|
| 136 |
+
st.markdown("""
|
| 137 |
+
<style>
|
| 138 |
+
.block-container {
|
| 139 |
+
padding-top: 1.75rem;
|
| 140 |
+
padding-bottom: 0rem;
|
| 141 |
+
padding-left: 0rem;
|
| 142 |
+
padding-right: 0rem;
|
| 143 |
+
max-width: 664px;
|
| 144 |
+
}
|
| 145 |
+
</style>
|
| 146 |
+
""", unsafe_allow_html=True)
|
| 147 |
+
|
| 148 |
+
detector = Detector(face_model="retinaface", landmark_model= "pfld")
|
| 149 |
source = "Webcam"
|
| 150 |
recog = True
|
| 151 |
|
|
|
|
| 183 |
use_container_width= False
|
| 184 |
)
|
| 185 |
img = np.array(Image.open(frame))
|
| 186 |
+
pic.image(image_processing(img), use_column_width = "always")
|
| 187 |
|
| 188 |
|
| 189 |
recog = st.toggle(":green[Emotion recogntion]", key = "stream", value = True)
|