Spaces:
Runtime error
Runtime error
A newer version of the Gradio SDK is available: 6.12.0
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
python -m venv envsource env/bin/activatepip install -r requirements.txtpython main.py(if you don't have the vector db populated already changeforce_reindexinmain.pyfromFalsetoTrue)- Go to http://localhost:7860 in your browser