Deepfake-Detector / setup.py
AZIIIIIIIIZ's picture
Upload 1039 files
d670799 verified
#!/usr/bin/env python3
"""
Setup script for GenVidBench on Hugging Face Spaces
"""
import os
import subprocess
import sys
def run_command(cmd):
"""Run a command and return success status"""
try:
result = subprocess.run(cmd, shell=True, check=True, capture_output=True, text=True)
print(f"βœ… {cmd}")
return True
except subprocess.CalledProcessError as e:
print(f"❌ {cmd}")
print(f"Error: {e.stderr}")
return False
def main():
"""Setup the environment for Hugging Face Spaces"""
print("πŸš€ Setting up GenVidBench for Hugging Face Spaces...")
# Create necessary directories
os.makedirs('checkpoints', exist_ok=True)
os.makedirs('tools/data/kinetics', exist_ok=True)
# Download model checkpoint
print("πŸ“₯ Downloading model checkpoint...")
if not run_command("python download_model.py"):
print("⚠️ Model download failed. Please check your internet connection.")
return False
print("βœ… Setup completed successfully!")
return True
if __name__ == "__main__":
main()