prasanth.thangavel commited on
Commit
c70efb0
·
1 Parent(s): cda0e5d

Update readme for better clarity

Browse files
Files changed (1) hide show
  1. README.md +27 -6
README.md CHANGED
@@ -15,19 +15,39 @@ This application uses
15
  - [`yt_dlp`](https://github.com/yt-dlp/yt-dlp) - For downloading Audio/Video from YouTube and YoutTube Music.
16
  - HF [`gradio`](https://www.gradio.app/) - For UI.
17
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  ## Cookies setup details
19
- *Note: This setup is only needed if running in hugging face (HF) spaces to avoid bot related errors*.
 
 
 
 
20
 
21
- 1. **Download the YouTube Cookies**
22
  - Follow the instruction provided [here](https://github.com/yt-dlp/yt-dlp/wiki/Extractors#exporting-youtube-cookies) to download the YouTube cookies.
23
  - Rename the downloaded cookie as `cookies.firefox-private.txt` and place it in the current working directory
24
- 2. **Convert cookie file content to `.env` file**
25
  - Simple copy paste will not work due to special characters
26
  - So, we will use the `cookies_to_env` function.
27
  - Uncomment the `# Convert cookie file to env and save locally` section and run the code
28
  - Remember to comment the code once the `.env` file is updated.
29
  3. **Set up or Update the Secrets in HF**
30
- - Copy the the `.env` content (only the value, and not the key) and paste it inside the Secrets (Private) > `FIREFOX_COOKIES` in Hugging Face space.
31
  4. **Deploy the changes to HF space, and Voila!**
32
 
33
  ## `.env` file structure
@@ -39,6 +59,7 @@ USE_FIREFOX_COOKIES="False" # Set to "True" to use cookies
39
  ## Additional resources
40
  - Check out the configuration (and README metadata) reference [here](https://huggingface.co/docs/hub/spaces-config-reference)
41
 
42
- ## Potential Improvements
43
  - [ ] Making the code async.
44
- - [ ] Add support for playlists.
 
 
15
  - [`yt_dlp`](https://github.com/yt-dlp/yt-dlp) - For downloading Audio/Video from YouTube and YoutTube Music.
16
  - HF [`gradio`](https://www.gradio.app/) - For UI.
17
 
18
+ # Running locally
19
+ ## Installation
20
+ - First, install `python 3.11.5` (preferrably in a virtual environment).
21
+ - Then, install by running `pip install gradio==5.9.1`
22
+ - Finally, install remaining libraries by running `pip install -r requirements.txt`
23
+
24
+ ## Start the service
25
+ ```
26
+ gradio app.py # For iterative developments
27
+ ```
28
+ or
29
+ ```
30
+ python app.py
31
+ ```
32
+
33
+ # Running in Hugging Face Spaces
34
  ## Cookies setup details
35
+ > [!NOTE]
36
+ > This setup is only needed if running in hugging face (HF) spaces or other deployments to avoid bot related errors. If running locally, the code will work right away.
37
+
38
+ > [!CAUTION]
39
+ > Using this approach in publicly deployed services is discouraged, as the YouTube algorithm may disable the entire YouTube account from which the cookies are downloaded after continued use.
40
 
41
+ 1. **Download the YouTube Cookies locally**
42
  - Follow the instruction provided [here](https://github.com/yt-dlp/yt-dlp/wiki/Extractors#exporting-youtube-cookies) to download the YouTube cookies.
43
  - Rename the downloaded cookie as `cookies.firefox-private.txt` and place it in the current working directory
44
+ 2. **Convert cookie file content to `.env` file locally**
45
  - Simple copy paste will not work due to special characters
46
  - So, we will use the `cookies_to_env` function.
47
  - Uncomment the `# Convert cookie file to env and save locally` section and run the code
48
  - Remember to comment the code once the `.env` file is updated.
49
  3. **Set up or Update the Secrets in HF**
50
+ - Copy the `.env` content (only the value, and not the key) and paste it inside the Secrets (Private) > `FIREFOX_COOKIES` in Hugging Face space.
51
  4. **Deploy the changes to HF space, and Voila!**
52
 
53
  ## `.env` file structure
 
59
  ## Additional resources
60
  - Check out the configuration (and README metadata) reference [here](https://huggingface.co/docs/hub/spaces-config-reference)
61
 
62
+ # Potential Improvements
63
  - [ ] Making the code async.
64
+ - [ ] Add support for playlists.
65
+ - [ ] Overcome youtube bot issue for publicly deployed service.