Spaces:
Running
Running
Yaron Koresh
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
import os
|
|
|
2 |
import re
|
3 |
import spaces
|
4 |
import random
|
@@ -27,13 +28,16 @@ import warnings
|
|
27 |
def err(msg):
|
28 |
print( msg )
|
29 |
pass
|
30 |
-
|
31 |
-
def out(msg):
|
32 |
-
return "\n• "+str(msg)+"\n"
|
33 |
-
|
34 |
warnings.filterwarnings("ignore")
|
35 |
sys.stderr.write = err
|
36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
|
38 |
last_motion=None
|
39 |
fps=15
|
|
|
1 |
import os
|
2 |
+
import logging
|
3 |
import re
|
4 |
import spaces
|
5 |
import random
|
|
|
28 |
def err(msg):
|
29 |
print( msg )
|
30 |
pass
|
31 |
+
|
|
|
|
|
|
|
32 |
warnings.filterwarnings("ignore")
|
33 |
sys.stderr.write = err
|
34 |
+
root = logging.getLogger()
|
35 |
+
root.setLevel(logging.DEBUG)
|
36 |
+
handler = logging.StreamHandler(sys.stdout)
|
37 |
+
handler.setLevel(logging.DEBUG)
|
38 |
+
formatter = logging.Formatter('\n>>> [%(levelname)s] %(asctime)s %(name)s: %(message)s\n')
|
39 |
+
handler.setFormatter(formatter)
|
40 |
+
root.addHandler(handler)
|
41 |
|
42 |
last_motion=None
|
43 |
fps=15
|