EnochSearch / README.md
SuperLikeLT's picture
Upload folder using huggingface_hub
9d0cb7b verified
|
Raw History Blame Contribute Delete
1.45 kB

A newer version of the Gradio SDK is available: 6.32.0

Upgrade
metadata
title: EnochSearch
app_file: app.py
sdk: gradio
sdk_version: 5.49.1

Week 4 Day 3 β€” 2_lab2.ipynb on Hugging Face

This Space is the Gradio + LangGraph app from 4_langgraph/2_lab2.ipynb:

  • Tools: web search (Serper when SERPER_API_KEY is set; otherwise DuckDuckGo β†’ Wikipedia β†’ LLM) and optional Pushover.
  • Graph: chatbot ↔ tools with tools_condition, same as the notebook.
  • Memory: MemorySaver + thread_id so conversation is checkpointed like the β€œOK it's time to add Memory!” section.

Secrets (Space β†’ Settings β†’ Repository secrets)

Variable Required Notes
OPENAI_API_KEY Yes Chat model gpt-4o-mini
SERPER_API_KEY No Better search via serper.dev
PUSHOVER_TOKEN / PUSHOVER_USER No Push notifications
LAB2_THREAD_ID No Defaults to hf-1; change to reset logical thread

Local run

cd huggingface-project
pip install -r requirements.txt
# set OPENAI_API_KEY in .env or environment
python app.py

Files

File Role
app.py Gradio ChatInterface, loads graph + memory
graph_lab2.py StateGraph, ToolNode, checkpoint compile
tools_lab2.py search + send_push_notification

This is not the Sidekick / Playwright project (4_lab4 / sidekick.py); no browser automation and no Docker is required.