Skip to content

Commit 9d9dd45

Browse files
update readme
1 parent eae5683 commit 9d9dd45

File tree

1 file changed

+37
-17
lines changed

1 file changed

+37
-17
lines changed

recipes/weaviate/README.md

Lines changed: 37 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,52 @@
1-
# How to run the demo app (Optional: Add what kind of app it is/the tech the app is built with)
2-
This is a recipe for a [TODO: Add the kind of app it is]. TODO: Add one sentence describing what the app does.
1+
# How to run the demo app
2+
This is a recipe for a movie recommendation app. The app uses [Weaviate](https://weaviate.io/) to create a vector database of movie titles and [Streamlit](https://streamlit.io/) to create a recommendation chatbot.
33

44
Other ways to explore this recipe:
5-
* [Deployed app](TODO: URL of deployed app)
6-
* [Blog post](TODO: URL of blog post)
7-
* [Video](TODO: URL of video)
5+
* [Deployed app](https://weaviate-movie-magic.streamlit.app/)
6+
* [Video](https://youtu.be/SQD-aWlhqvM?si=t54W53G1gWnTAiwx)
87

98
## Prerequisites
109
* Python >=3.8, !=3.9.7
11-
* TODO: List additional prerequisites
10+
* [A Weaviate API key and URL](https://auth.wcs.api.weaviate.io/auth/realms/SeMI/login-actions/registration?client_id=wcs-frontend&tab_id=5bw6GQTdWU0)
11+
* [A Cohere API key](https://dashboard.cohere.com/welcome/register)
1212

1313
## Environment setup
1414
### Local setup
15+
16+
#### Create a virtual environment
1517
1. Clone the Cookbook repo: `git clone https://github.com/streamlit/cookbook.git`
16-
2. From the Cookbook root directory, change directory into the recipe: `cd recipes/TODO: Add recipe directory`
18+
2. From the Cookbook root directory, change directory into the recipe: `cd recipes/weaviate`
1719
3. Add secrets to the `.streamlit/secrets_template.toml` file
1820
4. Update the filename from `secrets_template.toml` to `secrets.toml`: `mv .streamlit/secrets_template.toml .streamlit/secrets.toml`
1921

2022
(To learn more about secrets handling in Streamlit, refer to the documentation [here](https://docs.streamlit.io/develop/concepts/connections/secrets-management).)
21-
5. Create a virtual environment: `python -m venv TODO: Add name of virtual environment`
22-
6. Activate the virtual environment: `source TODO: Add name of virtual environment/bin/activate`
23+
5. Create a virtual environment: `python3 -m venv weaviatevenv`
24+
6. Activate the virtual environment: `source weaviatevenv/bin/activate`
2325
7. Install the dependencies: `pip install -r requirements.txt`
2426

25-
### GitHub Codespaces setup
26-
1. Create a new codespace by selecting the `Codespaces` option from the `Code` button
27-
2. Once the codespace has been generated, add your secrets to the `recipes/TODO: Add recipe directory/.streamlit/secrets_template.toml` file
28-
3. Update the filename from `secrets_template.toml` to `secrets.toml`
29-
30-
(To learn more about secrets handling in Streamlit, refer to the documentation [here](https://docs.streamlit.io/develop/concepts/connections/secrets-management).)
31-
4. From the Cookbook root directory, change directory into the recipe: `cd recipes/TODO: Add recipe directory`
32-
5. Install the dependencies: `pip install -r requirements.txt`
27+
#### Add data to your Weaviate Cloud
28+
1. Create a Weaviate Cloud [Collection](https://weaviate.io/developers/weaviate/config-refs/schema#introduction) and add data to it: `python3 helpers/add_data.py`
29+
2. (Optional) Verify the data: `python3 helpers/verify_data.py`
30+
3. (Optional) Use the Weaviate Cloud UI to [query the Collection](https://weaviate.io/developers/weaviate/connections/connect-query#example-query):
31+
```
32+
{ Get {MovieDemo (limit: 3
33+
where: { path: ["release_year"],
34+
operator: Equal,
35+
valueInt: 1985}) {
36+
budget
37+
movie_id
38+
overview
39+
release_year
40+
revenue
41+
tagline
42+
title
43+
vote_average
44+
vote_count
45+
}}}
46+
```
47+
48+
#### Run the app
49+
1. Run the app with: `streamlit run demo_app.py`
50+
2. The app should spin up in a new browser tab
51+
52+
(Please note that this version of the demo app does not feature the poster images so it will look different from the [deployed app](https://weaviate-movie-magic.streamlit.app/).)

0 commit comments

Comments
 (0)