# --- Core LangChain and LangGraph --- # Pin versions for stability. Check PyPI for the latest compatible versions. # The LangGraph error strongly suggests an older version is being used. # Ensure langgraph is recent enough to have CompiledGraph in langgraph.graph langchain langchain-core # LangGraph often has tight deps on langchain-core langgraph # CRITICAL: This should fix 'CompiledGraph' import error typing_extensions # Crucial for LangGraph state langgraph==0.0.28 # --- LLM Providers & Related --- langchain-google-genai google-genai # langchain-openai # If you plan to use OpenAI models # openai # If using langchain-openai # tiktoken # If using langchain-openai # --- Community & Experimental --- langchain-community langchain-experimental # For PythonREPLTool # --- UI --- gradio # Pick a recent stable version that supports your UI features # --- Data Handling & HTTP --- pandas requests openpyxl # For Pandas to read/write Excel files (if needed by a tool or data loading) # --- Tools & File Processing --- huggingface_hub PyPDF2 Pillow pytesseract openai-whisper # For audio transcription tavily-python duckduckgo-search # --- Multimedia Processing (for Whisper & potentially other tools) --- # These are often needed for Whisper to process various audio formats ffmpeg-python soundfile torch # Whisper dependency torchaudio # Whisper dependency transformers[torch] # Might be pulled in by Whisper or other HF models # --- Other utilities --- python-dotenv # For .env file handling locally, not strictly for HF Spaces secrets # pydantic # Usually a dependency of LangChain/LangGraph, explicit if needed for own models # beautifulsoup4 # If doing web scraping # lxml # If doing XML/HTML parsing # smolagents # If you are using this specific library # wikipedia # For the wikipedia tool if used directly # --- Optional: Vector Stores (Example: Supabase) --- # supabase>=1.0,<2.0 # psycopg2-binary # If using Supabase with Postgres # NOTES: # 1. LangGraph `CompiledGraph` Import Error: The key fix is upgrading `langgraph` and its dependencies like `langchain-core`. # 2. Tesseract OCR Engine: For `pytesseract` to work, the Tesseract OCR engine must be installed in the OS of the Hugging Face Space. # This often requires adding `apt-get install -y tesseract-ocr` (and possibly language packs like `tesseract-ocr-eng`) # to a `packages.txt` file in your Hugging Face Space if it's not pre-installed. # 3. FFMPEG: For `openai-whisper` to handle various audio formats, `ffmpeg` needs to be available in the Space's OS. # Add `ffmpeg` to your `packages.txt` file (e.g., `apt-get install -y ffmpeg`).