Skip to content

poacosta/literary-finder

Repository files navigation

title The Literary Finder
emoji 📚
colorFrom blue
colorTo purple
sdk gradio
sdk_version 5.39.0
app_file app.py
pinned false

The Literary Finder - Hugging Face Spaces

A Multi-Agent System for Deep Literary Discovery

Welcome to The Literary Finder on Hugging Face Spaces! This AI-powered system transforms how readers discover and connect with authors through a sophisticated multi-agent architecture.

Technical README

Official Publication

Prerequisites & Requirements

System Requirements

  • Python: 3.8 or higher
  • Memory: 512MB+ RAM available
  • Network: Internet connection for API calls
  • Browser: Modern web browser for interface access

Required Dependencies

  • OpenAI API Key (required) - For GPT-4o-mini language processing
  • Google Books API Key (optional but recommended) - For enhanced bibliography discovery

Installation Requirements

All Python dependencies are automatically installed. See requirements.txt for complete list:

  • LangChain & LangGraph for agent orchestration
  • Gradio 5.39.0 for web interface
  • FastAPI for REST API functionality
  • Pydantic for data validation

Quick Start

  1. Provide API Keys: Enter your OpenAI API key in the "API Configuration" section
  2. Enter Author Name: Type the name of any author you'd like to explore
  3. Click Analyze: Wait 1-3 minutes for comprehensive analysis
  4. Explore Results: Read the detailed literary report generated by our AI agents

Required API Keys

OpenAI API Key (Required)

  • Purpose: Powers the GPT-4o-mini model for literary analysis and web search
  • Get yours: Visit OpenAI Platform
  • Cost: ~$0.10-0.50 per analysis (very affordable with gpt-4o-mini)

Google Books API Key (Optional)

  • Purpose: Enhanced bibliography discovery and book metadata
  • Get yours: Visit Google Cloud Console
  • Cost: Free tier includes 1,000 requests/day

What You'll Get

Comprehensive Literary Analysis

  • Biographical Context: Life story, historical background, and cultural influences
  • Reading Map: Strategic guide through the author's works with recommended starting points
  • Literary Analysis: Style innovations, recurring themes, and critical significance
  • Performance Metrics: Quality assessment and system evaluation

AI-Powered Multi-Agent System

Our system uses three specialized AI agents working together:

  1. Contextual Historian: Biographical research and historical context
  2. Literary Cartographer: Bibliography compilation and reading recommendations
  3. Legacy Connector: Literary analysis and critical assessment

Example Authors to Try

  • Virginia Woolf - Modernist pioneer with stream-of-consciousness technique
  • Gabriel García Márquez - Master of magical realism
  • Toni Morrison - Nobel laureate exploring African American experience
  • Jorge Luis Borges - Argentine writer of philosophical short stories
  • Maya Angelou - Autobiographical works and civil rights activism
  • Haruki Murakami - Contemporary Japanese novelist blending reality and surrealism
  • José Saramago - Portuguese Nobel laureate known for experimental narratives
  • Chinua Achebe - Nigerian author of postcolonial literature
  • Italo Calvino - Italian writer of imaginative fiction
  • Simone de Beauvoir - French existentialist philosopher and author

Technical Features

  • Parallel Processing: Agents work simultaneously for faster results
  • Quality Evaluation: Real-time performance metrics and recommendations
  • Gradio Interface: User-friendly web interface optimized for Spaces
  • Cost-Effective: Uses GPT-4o-mini for affordable, high-quality analysis

Performance Expectations

  • Processing Time: 1-3 minutes per author
  • Success Rate: 95%+ with valid API keys
  • Report Length: 10,000-15,000 characters of comprehensive analysis
  • API Cost: ~$0.10-0.50 per analysis (OpenAI GPT-4o-mini pricing)

Privacy & Security

  • API Keys: Stored temporarily in session only, never logged or saved
  • No Data Persistence: No user data or API keys are stored permanently
  • Secure Processing: All analysis happens in real-time with immediate cleanup

Troubleshooting

Common Issues

  • "Missing API Key": Ensure you've entered a valid OpenAI API key
  • "Analysis Failed": Check your API key has sufficient credits
  • Slow Performance: Analysis takes 1-3 minutes - this is normal for comprehensive research

API Key Issues

  • OpenAI: Ensure your key starts with sk- and has available credits
  • Google: Make sure Books API is enabled in your Google Cloud project

License & Usage Rights

The Literary Finder is released under the MIT License, providing maximum freedom for use, modification, and distribution:

What You Can Do

  • Commercial Use: Deploy in production environments and commercial applications
  • Modification: Adapt and extend the codebase for your specific needs
  • Distribution: Share the software with others, including modified versions
  • Private Use: Use internally within your organization without restrictions

Your Obligations

  • Include License: The MIT license notice must be included in all copies
  • Attribution: Credit the original authors when redistributing

Legal Protection

  • No Warranty: Software provided "as-is" without guarantees
  • Limited Liability: Authors not liable for any damages from software use

For complete license terms, see the LICENSE file.

About The Literary Finder

The Literary Finder demonstrates advanced AI agent coordination using:

  • LangChain & LangGraph: For agent orchestration and workflow management
  • OpenAI GPT-4o-mini: Cost-effective, high-quality language model
  • Multi-Agent Architecture: Specialized agents with distinct research roles
  • Real-Time Evaluation: Performance monitoring and quality assessment

Links

About

A Multi-Agent System for Deep Literary Discovery

Topics

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Contributors