TrueLens-Forensics / scratch /analyze_trigger.py
abhisonu01's picture
Upload folder using huggingface_hub
34ad4eb verified
raw
history blame contribute delete
434 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('Analyze') # case sensitive? maybe "ANALYZE"
if idx == -1:
idx = content.find('analyze')
if idx == -1:
idx = content.find('Predict')
if idx != -1:
print(f"Found at {idx}")
print(f"Context: {content[idx-100:idx+300]}")
else:
print("Not found")