Download Server/test.py from krishnashahu214/Deepfake-Video-Detection: direct link, hf CLI and curl.
- Browser
- Download file 695 Bytes
-
https://huggingface.co/spaces/krishnashahu214/Deepfake-Video-Detection/resolve/main/Server/test.py
- Command line
-
hf download hf://spaces/krishnashahu214/Deepfake-Video-Detection/Server/test.py
-
curl -L -o test.py https://huggingface.co/spaces/krishnashahu214/Deepfake-Video-Detection/resolve/main/Server/test.py
695 Bytes
| import sys | |
| sys.path.append(r"C:\Users\ASUS\OneDrive\Desktop\kkkkk\Deepfake-video-Detection\ML model\ensemble_prediction_system") | |
| from EnsemCNet import detectDeepfake , extractFrame , metaLearner | |
| if __name__ == "__main__" : | |
| video_path = r"C:\Users\ASUS\OneDrive\Desktop\kkkkk\Deepfake-video-Detection\ML model\ensemble_prediction_system\Realistic_Deepfake_Video_Generation.mp4" | |
| output_path = r"C:\Users\ASUS\OneDrive\Desktop\kkkkk\Deepfake-video-Detection\ML model\ensemble_prediction_system\user_video" | |
| frame_folder = extractFrame(video_path,output_path) | |
| model_output = detectDeepfake(frame_folder) | |
| lr = metaLearner() | |
| pred = lr.predict(model_output) | |
| print(pred) |