adamfallon's picture
Update README.md
0d36e2f verified

A newer version of the Gradio SDK is available: 6.12.0

Upgrade
metadata
title: Trainline Train Times
emoji: 🏃
colorFrom: purple
colorTo: gray
sdk: gradio
sdk_version: 4.41.0
app_file: app.py
pinned: false
python_version: 3.11.5

Trainline Train Time Q & A

Simple project using an LLM to do Q&A over Trainline Train Time Pages.

Retrieves some web content from Trainline, stores the Journey Info in a VectorDB and allows you to do question and answering over the data.

To run locally;

  • Model: meta-llama/Llama-2-13b-chat-hf
model_options = {
    "temperature": 0.1,
    "max_length": 256,
    "stop_sequence": ".",
    "max_new_tokens": 2056,
}
  • Embeddings: text-embedding-ada-002-v2
ChunkingStrategy = RecursiveCharacterTextSplitter
chunk_size = 1000
chunk_overlap = 0
  • VectorDB: ChromaDB
search_kwargs = {
    "k": 5,
    "search_type": "mmr"
}

Setup

  1. python -m venv env
  2. source env/bin/activate
  3. pip install -r requirements.txt
  4. python main.py (if you don't have the vector db populated already change force_reindex in main.py from False to True)
  5. Go to http://localhost:7860 in your browser