Fork 2

A small langchain demo project of a QA on movies


A langchain movies demo in XetHub

We use langchain - index and openai to answer questions about Hollywood movies.


pip install -r requirements.txt



# Retrain from scratch
python src/train.py

# Insert a file  
python src/put.py --branch=temp --hackx=10 tests/data/fresh_prince.txt data

# Remove a file
python src/delete.py --branch=temp data/fresh_prince.txt

Run the app

gradio app.py

Development story

Simply forked Yonatan's langchain_demo Xet repo from XetHub and then I wanted to build a similar app for movie trivia.

I grabbed a movies dataset from Kaggle and augmented using some Python code and IMDB, and then retrained the index and voila!

Just added a more representative image and the initial verison is done! Ask away!

Testing in the app:

Question: "Who played Neo in the 'The Matrix'?" Answer: "Keanu Reeves played Neo in The Matrix" Sources: "data/movies.csv"

Question: "Who voiced the voice of Nemo in 'Finding Nemo'"?

File List Total items: 12
Name Last Commit Size Last Modified
assets Added examples, app details, UI tweaks 1 year ago
data final dataset - 35K movies 1 year ago
gradio_cached_examples/16 Added examples, app details, UI tweaks 1 year ago
model Add the model 1 year ago
src Updated logging dir so capsule runs 1 year ago
tests attempting first model 1 year ago
.gitattributes Initial commit 79 B 1 year ago
.gitignore move scripts to src 8.7 KiB 1 year ago
app.py Added examples, app details, UI tweaks 2.3 KiB 1 year ago
config.py fully working 300 B 1 year ago
readme.md Updated readme for movie demo 1.2 KiB 1 year ago
requirements.txt app working 1.7 KiB 1 year ago


A small langchain demo project of a QA on movies

Repository Size

Loading repo size...

Commits 80 commits


File Types