Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -75,7 +75,7 @@ import numpy as np
|
|
75 |
import cv2
|
76 |
import copy
|
77 |
import random
|
78 |
-
video_files = glob.glob('
|
79 |
random.shuffle(video_files)
|
80 |
random.shuffle(video_files)
|
81 |
frame_count = []
|
@@ -146,7 +146,7 @@ def im_plot(tensor):
|
|
146 |
#count the number of fake and real videos
|
147 |
def number_of_real_and_fake_videos(data_list):
|
148 |
header_list = ["filename","label"]
|
149 |
-
lab = pd.read_csv('
|
150 |
fake = 0
|
151 |
real = 0
|
152 |
for i in data_list:
|
@@ -164,7 +164,7 @@ import pandas as pd
|
|
164 |
from sklearn.model_selection import train_test_split
|
165 |
|
166 |
header_list = ["filename","label"]
|
167 |
-
labels = pd.read_csv('
|
168 |
#print(labels)
|
169 |
train_videos = video_files[:int(0.75*len(video_files))]
|
170 |
valid_videos = video_files[int(0.75*len(video_files)):]
|
|
|
75 |
import cv2
|
76 |
import copy
|
77 |
import random
|
78 |
+
video_files = glob.glob('dataset final/*.mp4')
|
79 |
random.shuffle(video_files)
|
80 |
random.shuffle(video_files)
|
81 |
frame_count = []
|
|
|
146 |
#count the number of fake and real videos
|
147 |
def number_of_real_and_fake_videos(data_list):
|
148 |
header_list = ["filename","label"]
|
149 |
+
lab = pd.read_csv('labels.csv',names=header_list)
|
150 |
fake = 0
|
151 |
real = 0
|
152 |
for i in data_list:
|
|
|
164 |
from sklearn.model_selection import train_test_split
|
165 |
|
166 |
header_list = ["filename","label"]
|
167 |
+
labels = pd.read_csv('labels.csv',names=header_list)
|
168 |
#print(labels)
|
169 |
train_videos = video_files[:int(0.75*len(video_files))]
|
170 |
valid_videos = video_files[int(0.75*len(video_files)):]
|