-
Notifications
You must be signed in to change notification settings - Fork 584
Description
Ps: I was working on google collab.
from google.colab import files
Upload the script
uploaded = files.upload()
import os
Assuming the uploaded file is named 'faceforensics_download_v4 (1) .py'
If you know the file name will always be 'faceforensics_download_v4 (1) .py', you can use that directly
original_filename = 'faceforensics_download_v4 (1) .py'
Open the file to read and modify
with open('/content/' + original_filename, 'r') as file:
lines = file.readlines()
Create a new file to write the modified content
with open('/content/download_FaceForensics.py', 'w') as file:
for line in lines:
# Skip lines asking for user confirmation
if 'Press any key to continue, or CTRL-C to exit.' in line:
continue
if 'By pressing any key to continue you confirm that you have agreed '
'to the FaceForensics terms of use as described at:' in line:
continue
# Write other lines to the new file
file.write(line)
Run the modified script with the --server parameter
!python3 /content/download_FaceForensics.py /content/faceforensics -d all -c c23 -t videos --server EU2
double check your filename and change if necessary and there you go.