dhruthick commited on
Commit
dd817e4
·
1 Parent(s): 1d48db3

containerized with docker

Browse files
Files changed (3) hide show
  1. Dockerfile +16 -0
  2. app.py +1 -4
  3. requirements.txt +5 -0
Dockerfile ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python
2
+
3
+ WORKDIR /app
4
+
5
+ # Copy the requirements.txt file into the image
6
+ COPY requirements.txt .
7
+
8
+ # Install the Python dependencies
9
+ RUN pip install --upgrade pip
10
+ RUN pip install -r requirements.txt
11
+
12
+ COPY . .
13
+
14
+ EXPOSE 8000
15
+
16
+ CMD ["python", "app.py"]
app.py CHANGED
@@ -94,9 +94,6 @@ def predict():
94
  return jsonify({'mood': '-', 'lyrics': lyrics})
95
 
96
  def get_lyrics(song_title, artist_name):
97
- # Implement the lyrics fetching logic here
98
- # This is a placeholder function
99
- # Get the token from the configuration
100
  token = config.get('GENIUS_TOKEN')
101
  genius = Genius(token)
102
  genius.timeout = 300
@@ -118,4 +115,4 @@ def get_lyrics(song_title, artist_name):
118
  return False, "TIMEOUT"
119
 
120
  if __name__ == '__main__':
121
- app.run(debug=True)
 
94
  return jsonify({'mood': '-', 'lyrics': lyrics})
95
 
96
  def get_lyrics(song_title, artist_name):
 
 
 
97
  token = config.get('GENIUS_TOKEN')
98
  genius = Genius(token)
99
  genius.timeout = 300
 
115
  return False, "TIMEOUT"
116
 
117
  if __name__ == '__main__':
118
+ app.run(host='0.0.0.0', port=8000)
requirements.txt ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ flask
2
+ numpy
3
+ lyricsgenius
4
+ torch
5
+ transformers