Francesco commited on
Commit
d33f75e
โ€ข
1 Parent(s): e2dbbeb

updated README.md

Browse files
Files changed (1) hide show
  1. README.md +49 -0
README.md CHANGED
@@ -8,3 +8,52 @@ sdk_version: "1.19.0"
8
  app_file: app.py
9
  pinned: false
10
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  app_file: app.py
9
  pinned: false
10
  ---
11
+
12
+ # FairytaleDJ ๐ŸŽต๐Ÿฐ๐Ÿ”ฎ
13
+
14
+ The app is on [hugging face spaces](https://huggingface.co/spaces/Francesco/FairytaleDJ) ๐Ÿค—
15
+
16
+ This app takes a user input and suggestes songs that matches its emotions/vibes.
17
+
18
+ Made with [DeepLake](https://www.deeplake.ai/) ๐Ÿš€ and [LangChain](https://python.langchain.com/en/latest/index.html) ๐Ÿฆœโ›“๏ธ
19
+
20
+ We also used [upstash](https://upstash.com/) to store user inputs/emotions and recommended songs
21
+
22
+ ## How it works
23
+
24
+ The application follows a sequence of steps to deliver Disney songs matching the user's emotions:
25
+ - **User Input**: The application starts by collecting user's emotional state through a text input.
26
+ - **Emotion Encoding**: The user-provided emotions are then fed to a Language Model (LLM). The LLM interprets and encodes these emotions.
27
+ - **Similarity Search**: These encoded emotions are utilized to perform a similarity search within our [vector database](https://www.deeplake.ai/). This database houses Disney songs, each represented as emotional embeddings.
28
+ - **Song Selection**: From the pool of top matching songs, the application randomly selects one. The selection is weighted, giving preference to songs with higher similarity scores.
29
+ - **Song Retrieval**: The selected song's embedded player is displayed on the webpage for the user. Additionally, the LLM interpreted emotional state associated with the chosen song is displayed.
30
+
31
+ ## Run it
32
+
33
+ Clone this repo.
34
+
35
+ create a `venv`
36
+
37
+ ```
38
+ python -m venv .venv
39
+ source .venv/bin/activate
40
+ pip install -r requirements.txt
41
+ ```
42
+
43
+ You will need the following `.env` file
44
+
45
+ ```bash
46
+ OPENAI_API_KEY=<OPENAI_API_KEY>
47
+ ACTIVELOOP_TOKEN=<ACTIVELOOP_TOKEN>
48
+ ACTIVELOOP_ORG_ID=zuppif
49
+ UPSTASH_URL=<UPSTASH_URL>
50
+ UPSTASH_PASSWORD=<UPSTASH_PASSWORD>
51
+ ```
52
+
53
+ Then
54
+
55
+ ```
56
+ streamlit run app.py
57
+ ```
58
+
59
+ Then navitage to `http://192.168.1.181:8501`