Spaces:
Running
Running
Commit
·
d7fd62c
1
Parent(s):
5543ce2
Update app and Dockerfile with latest changes
Browse files- Dockerfile +20 -0
- app.py +1 -1
- requirements.txt +2 -1
Dockerfile
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use an official Python runtime as a parent image
|
2 |
+
FROM python:3.9-slim
|
3 |
+
|
4 |
+
# Set the working directory in the container
|
5 |
+
WORKDIR /app
|
6 |
+
|
7 |
+
# Install FFmpeg
|
8 |
+
RUN apt-get update && apt-get install -y ffmpeg
|
9 |
+
|
10 |
+
# Copy the current directory contents into the container at /app
|
11 |
+
COPY . /app
|
12 |
+
|
13 |
+
# Install any needed packages specified in requirements.txt
|
14 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
15 |
+
|
16 |
+
# Expose the port that the app runs on
|
17 |
+
EXPOSE 8501
|
18 |
+
|
19 |
+
# Run the application
|
20 |
+
CMD ["streamlit", "run", "app.py"]
|
app.py
CHANGED
@@ -393,7 +393,7 @@ def plot_predictions(audio_features, predictions):
|
|
393 |
|
394 |
def main():
|
395 |
cover_image = "images/cover.jpg"
|
396 |
-
st.image(cover_image,
|
397 |
st.title("Chorus Finder")
|
398 |
st.write("This app uses a pre-trained convolutional recurrent neural network to predict chorus locations in music. To learn more about this project, visit [github.com/dennisvdang/chorus-detection](https://github.com/dennisvdang/chorus-detection).")
|
399 |
st.write("Enter a YouTube song URL to find the chorus!")
|
|
|
393 |
|
394 |
def main():
|
395 |
cover_image = "images/cover.jpg"
|
396 |
+
st.image(cover_image, use_container_width=True)
|
397 |
st.title("Chorus Finder")
|
398 |
st.write("This app uses a pre-trained convolutional recurrent neural network to predict chorus locations in music. To learn more about this project, visit [github.com/dennisvdang/chorus-detection](https://github.com/dennisvdang/chorus-detection).")
|
399 |
st.write("Enter a YouTube song URL to find the chorus!")
|
requirements.txt
CHANGED
@@ -10,4 +10,5 @@ pytube==15.0.0
|
|
10 |
scikit-learn==1.3.0
|
11 |
scipy==1.9.1
|
12 |
streamlit
|
13 |
-
tensorflow==2.15.0
|
|
|
|
10 |
scikit-learn==1.3.0
|
11 |
scipy==1.9.1
|
12 |
streamlit
|
13 |
+
tensorflow==2.15.0
|
14 |
+
yt-dlp==2023.10.7
|