Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -52,12 +52,9 @@ def convert_to_ela_image(path, quality):
|
|
52 |
|
53 |
return ela_im
|
54 |
|
55 |
-
|
56 |
-
drive.mount('/content/drive')
|
57 |
|
58 |
-
|
59 |
-
|
60 |
-
convert_to_ela_image('/content/drive/MyDrive/Images for Deep Fake/real_images/6401_0.jpg', 90)
|
61 |
|
62 |
Image.open('https://huggingface.co/spaces/Hemant0000/Deep_Fake_Detection/blob/main/Images%20for%20Deep%20Fake/fake_images/1601_0.jpg')
|
63 |
|
@@ -96,8 +93,8 @@ def create_image_dataset_csv(fake_folder, real_folder, output_csv):
|
|
96 |
print(f"CSV file '{output_csv}' has been created successfully with {len(image_data)} entries.")
|
97 |
|
98 |
# Example usage:
|
99 |
-
fake_images_folder = '
|
100 |
-
real_images_folder = '
|
101 |
output_csv_file = 'image_dataset.csv'
|
102 |
|
103 |
create_image_dataset_csv(fake_images_folder, real_images_folder, output_csv_file)
|
|
|
52 |
|
53 |
return ela_im
|
54 |
|
55 |
+
Image.open('https://huggingface.co/spaces/Hemant0000/Deep_Fake_Detection/blob/main/Images%20for%20Deep%20Fake/real_images/6401_0.jpg')
|
|
|
56 |
|
57 |
+
convert_to_ela_image('https://huggingface.co/spaces/Hemant0000/Deep_Fake_Detection/blob/main/Images%20for%20Deep%20Fake/real_images/6401_0.jpg', 90)
|
|
|
|
|
58 |
|
59 |
Image.open('https://huggingface.co/spaces/Hemant0000/Deep_Fake_Detection/blob/main/Images%20for%20Deep%20Fake/fake_images/1601_0.jpg')
|
60 |
|
|
|
93 |
print(f"CSV file '{output_csv}' has been created successfully with {len(image_data)} entries.")
|
94 |
|
95 |
# Example usage:
|
96 |
+
fake_images_folder = 'Images for Deep Fake/fake_images'
|
97 |
+
real_images_folder = 'Images for Deep Fake/real_images'
|
98 |
output_csv_file = 'image_dataset.csv'
|
99 |
|
100 |
create_image_dataset_csv(fake_images_folder, real_images_folder, output_csv_file)
|