%matplotlib inline
import numpy as np
import os
import matplotlib.pyplot as plt
fnames = np.array([f'train/{f}' for f in sorted(os.listdir('train/'))])
labels = np.array([(0 if 'cat' in fname else 1) for fname in fnames])
for i in range(100):
img = plt.imread(X_train[i])
plt.imshow(img);
plt.show()
index_num=detector(X_train[i])
if index_num ==0:
call='cat'
elif index_num ==1:
call='dog'
else:
call=index_num
print(f'the picture is {call}\n')
print(index_num)