subhan971 commited on
Commit
edf02b2
·
verified ·
1 Parent(s): f1ed428

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +98 -20
README.md CHANGED
@@ -1,20 +1,98 @@
1
- ---
2
- title: Hindi Song Recommendation
3
- emoji: 🚀
4
- colorFrom: red
5
- colorTo: red
6
- sdk: docker
7
- app_port: 8501
8
- tags:
9
- - streamlit
10
- pinned: false
11
- short_description: This project uses computer vision and machine learning to re
12
- license: cc-by-2.0
13
- ---
14
-
15
- # Welcome to Streamlit!
16
-
17
- Edit `/src/streamlit_app.py` to customize this app to your heart's desire. :heart:
18
-
19
- If you have any questions, checkout our [documentation](https://docs.streamlit.io) and [community
20
- forums](https://discuss.streamlit.io).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Hindi_Song_Recommender_from_Image
2
+ This project uses computer vision and machine learning to recommend Hindi songs based on the contents or mood of an image. By analyzing the visual features, color palette, and emotional tone of an uploaded image, the system suggests a suitable Hindi song that matches the detected vibe — such as romantic, sad, energetic, or peaceful.
3
+
4
+ ## Building the Docker Image
5
+
6
+ To build the Docker image for this application, make sure you have Docker installed and running. Then, navigate to the project's root directory in your terminal and run the following command:
7
+
8
+ ```bash
9
+ docker build -t hindi-song-recommender .
10
+ ```
11
+
12
+ This command will:
13
+ - `docker build`: Initiate the Docker image building process.
14
+ - `-t hindi-song-recommender`: Tag the image with the name `hindi-song-recommender`. You can choose a different tag if you prefer.
15
+ - `.`: Specify that the Dockerfile is located in the current directory.
16
+
17
+ After the build process is complete, you can verify that the image was created by running:
18
+
19
+ ```bash
20
+ docker images
21
+ ```
22
+ You should see `hindi-song-recommender` in the list of your Docker images.
23
+
24
+ ## Deployment Options
25
+
26
+ Once you have the application running locally or have built the Docker image, here are a few options to deploy it:
27
+
28
+ ### 1. Streamlit Sharing
29
+
30
+ Streamlit Sharing is a free service provided by Streamlit to deploy public applications directly from your GitHub repository.
31
+
32
+ **Steps:**
33
+ 1. Ensure your project is in a public GitHub repository.
34
+ 2. Make sure you have a `requirements.txt` file.
35
+ 3. Go to [share.streamlit.io](https://share.streamlit.io/) and sign up or log in.
36
+ 4. Click on "Deploy an app" and connect your GitHub account.
37
+ 5. Select the repository, branch, and the main Python file (`app.py`).
38
+ 6. Click "Deploy".
39
+
40
+ Your app will be deployed with a unique URL.
41
+
42
+ ### 2. Deploying the Docker Image
43
+
44
+ If you have built the Docker image as described above, you can deploy it to various cloud platforms that support Docker containers. Here are a couple of popular options:
45
+
46
+ **a. Google Cloud Run**
47
+
48
+ Google Cloud Run is a fully managed serverless platform that enables you to run stateless containers.
49
+
50
+ **General Steps:**
51
+ 1. **Push your Docker image to Google Container Registry (GCR) or Artifact Registry:**
52
+ ```bash
53
+ # Tag your local image
54
+ docker tag hindi-song-recommender gcr.io/YOUR_PROJECT_ID/hindi-song-recommender
55
+
56
+ # Configure Docker to use gcloud as a credential helper
57
+ gcloud auth configure-docker
58
+
59
+ # Push the image
60
+ docker push gcr.io/YOUR_PROJECT_ID/hindi-song-recommender
61
+ ```
62
+ Replace `YOUR_PROJECT_ID` with your actual Google Cloud Project ID.
63
+ 2. **Deploy to Cloud Run:**
64
+ You can do this via the Google Cloud Console UI or using the `gcloud` command-line tool:
65
+ ```bash
66
+ gcloud run deploy hindi-song-recommender-service --image gcr.io/YOUR_PROJECT_ID/hindi-song-recommender --platform managed --region YOUR_REGION --port 8501 --allow-unauthenticated
67
+ ```
68
+ Replace `YOUR_PROJECT_ID` and `YOUR_REGION` with your specific details. `--allow-unauthenticated` makes the service publicly accessible.
69
+
70
+ **b. AWS App Runner**
71
+
72
+ AWS App Runner is a fully managed service that makes it easy for developers to quickly deploy containerized web applications and APIs, at scale and with no prior infrastructure experience required.
73
+
74
+ **General Steps:**
75
+ 1. **Push your Docker image to Amazon Elastic Container Registry (ECR):**
76
+ - Create an ECR repository.
77
+ - Authenticate Docker to your ECR registry.
78
+ - Tag your local image with the ECR repository URI.
79
+ - Push the image to ECR.
80
+ (Refer to AWS documentation for specific `aws ecr` commands)
81
+ 2. **Create an App Runner Service:**
82
+ - Open the AWS App Runner console.
83
+ - Choose "Create an App Runner service".
84
+ - Select "Container registry" as the source.
85
+ - Choose "Amazon ECR" as the provider and select your image.
86
+ - Configure the service settings, including port (8501 for Streamlit).
87
+ - Deploy.
88
+
89
+ **c. Other Platforms**
90
+
91
+ Many other platforms support deploying Docker containers, such as:
92
+ - Azure Container Instances
93
+ - Heroku (using their container registry)
94
+ - DigitalOcean App Platform
95
+
96
+ The general idea is to push your Docker image to a container registry (like Docker Hub, GCR, ECR) and then point the hosting service to that image.
97
+
98
+ Remember to manage your API keys and other sensitive information securely, especially when deploying to public platforms. Consider using environment variables or secret management services provided by the cloud platforms.