forked from xdssio/langchain_demo
16 GiB materialized
5.6 GiB stored
A small langchain demo project of a QA on movies
readme.md
A langchain movies demo in XetHub
We use langchain - index and openai to answer questions about Hollywood movies.
Requirements
pip install -r requirements.txt
export OPENAI_API_KEY=YOUR_OPENAI_API_KEY
Usage
Train
# 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 | |||
data | |||
gradio_cached_examples/16 | |||
model | |||
src | |||
tests | |||
.gitattributes | |||
.gitignore | |||
app.py | |||
config.py | |||
readme.md | |||
requirements.txt |
About
A small langchain demo project of a QA on movies
Repository Size
Materialized: 16 GiB
Stored: 5.6 GiB
Activity 80 commits
-
committed ece50571fe 3mo ago
-
committed 671ee377d3 3mo ago
-
committed 233e4e4c40 4mo ago
-
committed a1ffe062c3 6mo ago
-
committed 4e3268c543 6mo ago