Live demo (Hugging Face Space): https://huggingface.co/spaces/singhalamaan116/Ask-Enron
Ask questions in natural language and get answers based on real Enron emails.
Under the hood, the app performs semantic search over the Enron email dataset and
uses a small language model to generate answers from the retrieved emails.
- Dataset:
corbt/enron-emails - Embeddings:
sentence-transformers/all-MiniLM-L6-v2 - LLM:
google/flan-t5-small - UI: Gradio (Blocks)
- Infra: Hugging Face Spaces (CPU)
- User enters a question (e.g., βWhat trips were people planning in August 2000?β).
- The question is embedded with a sentence-transformers model.
- We compute cosine similarity with precomputed embeddings of ~20k Enron emails.
- The top-
kemails are concatenated into a context. - A Flan-T5 model reads the context and generates an answer.
- The app shows:
- The answer
- The exact emails used as context
app.py # Gradio app (Spaces entry point)
requirements.txt
README.md