Spaces:
Runtime error
Runtime error
Lambang
commited on
Commit
·
50230bf
1
Parent(s):
809ffc6
jkb
Browse files
main.py
CHANGED
@@ -4,8 +4,6 @@ import uvicorn
|
|
4 |
import pandas as pd
|
5 |
import shutil
|
6 |
# import cv2
|
7 |
-
import mediapipe as mp
|
8 |
-
from werkzeug.utils import secure_filename
|
9 |
import tensorflow as tf
|
10 |
import os
|
11 |
from flask import Flask, jsonify, request, flash, redirect, url_for
|
@@ -13,8 +11,7 @@ from pyngrok import ngrok
|
|
13 |
from fastapi import FastAPI, HTTPException, File, UploadFile, Request
|
14 |
from fastapi.staticfiles import StaticFiles
|
15 |
from fastapi.responses import JSONResponse
|
16 |
-
|
17 |
-
import subprocess
|
18 |
|
19 |
from file_processing import FileProcess
|
20 |
from get_load_data import GetLoadData
|
@@ -37,7 +34,7 @@ landmark_extraction_img = True
|
|
37 |
# -----------------------------------------------------
|
38 |
# Tempat deklarasi model dan sejenisnya
|
39 |
selected_model = tf.keras.models.load_model(f'models/fc_model_1.h5', compile=False)
|
40 |
-
face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_alt2.xml')
|
41 |
mp_drawing = mp.solutions.drawing_utils
|
42 |
mp_face_mesh = mp.solutions.face_mesh
|
43 |
drawing_spec = mp_drawing.DrawingSpec(thickness=1, circle_radius=1)
|
|
|
4 |
import pandas as pd
|
5 |
import shutil
|
6 |
# import cv2
|
|
|
|
|
7 |
import tensorflow as tf
|
8 |
import os
|
9 |
from flask import Flask, jsonify, request, flash, redirect, url_for
|
|
|
11 |
from fastapi import FastAPI, HTTPException, File, UploadFile, Request
|
12 |
from fastapi.staticfiles import StaticFiles
|
13 |
from fastapi.responses import JSONResponse
|
14 |
+
|
|
|
15 |
|
16 |
from file_processing import FileProcess
|
17 |
from get_load_data import GetLoadData
|
|
|
34 |
# -----------------------------------------------------
|
35 |
# Tempat deklarasi model dan sejenisnya
|
36 |
selected_model = tf.keras.models.load_model(f'models/fc_model_1.h5', compile=False)
|
37 |
+
# face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_alt2.xml')
|
38 |
mp_drawing = mp.solutions.drawing_utils
|
39 |
mp_face_mesh = mp.solutions.face_mesh
|
40 |
drawing_spec = mp_drawing.DrawingSpec(thickness=1, circle_radius=1)
|