Spaces:
Running
Running
| 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}'") | |