File size: 639 Bytes
34ad4eb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

import os

html_path = 'e:/Deepfake/deepfake_detector/templates/index.html'
with open(html_path, 'r', encoding='utf-8') as f:
    content = f.read()

# Search for common patterns
print(f"Total length: {len(content)}")
patterns = [
    'type="file"',
    'accept=',
    'image/*',
    'startsWith("image/")',
    'FormData',
    '/predict'
]

for p in patterns:
    idx = content.find(p)
    if idx != -1:
        print(f"Found '{p}' at {idx}")
        # Print context
        start = max(0, idx - 100)
        end = min(len(content), idx + 200)
        print(f"Context: {content[start:end]}")
    else:
        print(f"Not found: '{p}'")