Spaces:
Sleeping
Sleeping
Jeong-hun Kim
commited on
Commit
ยท
9e5793d
1
Parent(s):
8428376
path setting fix
Browse files- app/main.py +4 -0
- howToStart.txt +14 -0
app/main.py
CHANGED
@@ -33,6 +33,8 @@ angry.png
|
|
33 |
๋ชจ๋ธ ์ถ๋ ฅ์ ๊ฐ์ ๋ถ๋ถ์ ๋์๋๋ ์ด๋ฏธ์ง ์ถ๋ ฅ
|
34 |
'''
|
35 |
def load_faces(face_dir="assets/face"):
|
|
|
|
|
36 |
emotion_to_face = {}
|
37 |
for filename in os.listdir(face_dir):
|
38 |
if filename.endswith(".png"):
|
@@ -41,6 +43,8 @@ def load_faces(face_dir="assets/face"):
|
|
41 |
return emotion_to_face
|
42 |
|
43 |
def load_bgs(bg_dir="assets/bg"):
|
|
|
|
|
44 |
situation_to_bg = {}
|
45 |
for filename in os.listdir(bg_dir):
|
46 |
if filename.endswith(".png"):
|
|
|
33 |
๋ชจ๋ธ ์ถ๋ ฅ์ ๊ฐ์ ๋ถ๋ถ์ ๋์๋๋ ์ด๋ฏธ์ง ์ถ๋ ฅ
|
34 |
'''
|
35 |
def load_faces(face_dir="assets/face"):
|
36 |
+
if not os.path.exists(face_dir):
|
37 |
+
os.makedirs(face_dir)
|
38 |
emotion_to_face = {}
|
39 |
for filename in os.listdir(face_dir):
|
40 |
if filename.endswith(".png"):
|
|
|
43 |
return emotion_to_face
|
44 |
|
45 |
def load_bgs(bg_dir="assets/bg"):
|
46 |
+
if not os.path.exists(bg_dir):
|
47 |
+
os.makedirs(bg_dir)
|
48 |
situation_to_bg = {}
|
49 |
for filename in os.listdir(bg_dir):
|
50 |
if filename.endswith(".png"):
|
howToStart.txt
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
!! python >= 3.11 !!
|
2 |
+
!! cuda >= 12.1 !!
|
3 |
+
|
4 |
+
1. make virtual machine
|
5 |
+
python -m venv venv
|
6 |
+
|
7 |
+
2. activate venv
|
8 |
+
venv\Scripts\activate
|
9 |
+
|
10 |
+
3. install requirements
|
11 |
+
pip install -r requirements.txt
|
12 |
+
|
13 |
+
4. start server
|
14 |
+
python app\main.py
|