Spaces:
Runtime error
Runtime error
Lambang commited on
Commit ·
4ca19a4
1
Parent(s): c29b885
test
Browse files
__pycache__/data_preprocess.cpython-39.pyc
ADDED
|
Binary file (3.76 kB). View file
|
|
|
__pycache__/file_processing.cpython-39.pyc
ADDED
|
Binary file (830 Bytes). View file
|
|
|
__pycache__/get_load_data.cpython-39.pyc
ADDED
|
Binary file (3.86 kB). View file
|
|
|
__pycache__/train_pred.cpython-39.pyc
ADDED
|
Binary file (7.83 kB). View file
|
|
|
main.py
CHANGED
|
@@ -69,6 +69,9 @@ def preprocessing(filepath):
|
|
| 69 |
shutil.rmtree(folder_path)
|
| 70 |
os.mkdir(folder_path)
|
| 71 |
|
|
|
|
|
|
|
|
|
|
| 72 |
# data_processor.detect_landmark(data_processor.face_cropping_pred(filepath))
|
| 73 |
data_processor.enhance_contrast_histeq(data_processor.face_cropping_pred(filepath))
|
| 74 |
|
|
@@ -119,3 +122,8 @@ async def upload_file(picture: UploadFile):
|
|
| 119 |
# urls.append(url)
|
| 120 |
# bentuk, persentase = data_train_pred.prediction(selected_model)
|
| 121 |
# return {'urls': urls, 'bentuk_wajah':bentuk[0], 'persen':persentase}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 69 |
shutil.rmtree(folder_path)
|
| 70 |
os.mkdir(folder_path)
|
| 71 |
|
| 72 |
+
cv2.imwrite("./static/test_upload.jpg", filepath)
|
| 73 |
+
|
| 74 |
+
|
| 75 |
# data_processor.detect_landmark(data_processor.face_cropping_pred(filepath))
|
| 76 |
data_processor.enhance_contrast_histeq(data_processor.face_cropping_pred(filepath))
|
| 77 |
|
|
|
|
| 122 |
# urls.append(url)
|
| 123 |
# bentuk, persentase = data_train_pred.prediction(selected_model)
|
| 124 |
# return {'urls': urls, 'bentuk_wajah':bentuk[0], 'persen':persentase}
|
| 125 |
+
|
| 126 |
+
# if __name__ == '__main__':
|
| 127 |
+
# import uvicorn
|
| 128 |
+
# print(f' * Running on {public_url}')
|
| 129 |
+
# uvicorn.run(app, host="0.0.0.0", port=8080)
|