TrueLens-Forensics / scratch /analyze_fetch_context.py
abhisonu01's picture
Upload folder using huggingface_hub
34ad4eb verified
raw
history blame contribute delete
320 Bytes
import os
html_path = 'e:/Deepfake/deepfake_detector/templates/index.html'
with open(html_path, 'r', encoding='utf-8') as f:
content = f.read()
idx = content.find('fetch("/predict"')
if idx != -1:
print(f"Found 'fetch' at {idx}")
print(f"Context: {content[idx-200:idx+800]}")
else:
print("Not found")