#!/usr/bin/env python3 """ Quick check to see if you have any saved RAG news """ from rag_news_manager import initialize_rag_system, get_rag_stats def quick_check(): """Quick check for saved news""" print("šŸ” Quick RAG System Check") print("=" * 30) # Initialize RAG system if not initialize_rag_system(): print("āŒ RAG system not initialized") print("šŸ’” Run: python setup_google_drive_rag.py") return # Get statistics stats = get_rag_stats() if not stats: print("āŒ Could not get statistics") return print(f"šŸ“Š Current Status:") print(f" Total entries: {stats['total_entries']}") if stats['total_entries'] == 0: print("šŸ“­ No news entries saved yet") print("šŸ’” Try analyzing some news with your app first!") print("šŸ’” News with 95%+ confidence will be automatically saved") else: print(f"āœ… You have {stats['total_entries']} saved news entries!") print(f" Real news: {stats['real_count']}") print(f" Fake news: {stats['fake_count']}") print(f" Average confidence: {stats['avg_confidence']:.1%}") if stats['latest_entry']: latest = stats['latest_entry'] print(f"\nšŸ“° Latest entry:") print(f" {latest['news_text'][:80]}...") print(f" {latest['prediction']} ({latest['gemini_confidence']:.1%})") # Show Google Drive links if stats['folder_id']: folder_url = f"https://drive.google.com/drive/folders/{stats['folder_id']}" print(f"\nšŸ”— Google Drive Folder: {folder_url}") if stats['file_id']: file_url = f"https://drive.google.com/file/d/{stats['file_id']}/view" print(f"šŸ”— Google Drive File: {file_url}") if __name__ == "__main__": quick_check()