Spaces:
Running
Running
Commit
·
66bef05
1
Parent(s):
37133a6
Fix module import error by adding setup.py and updating Docker configuration
Browse files- .space/app-entrypoint.sh +0 -0
- Dockerfile +5 -0
- setup.py +30 -0
.space/app-entrypoint.sh
CHANGED
Binary files a/.space/app-entrypoint.sh and b/.space/app-entrypoint.sh differ
|
|
Dockerfile
CHANGED
@@ -30,6 +30,11 @@ RUN chmod +x .space/app-entrypoint.sh || echo "Could not chmod app-entrypoint.sh
|
|
30 |
# Create symlinks to ensure proper imports
|
31 |
RUN ln -sf /app/src /src || echo "Could not create symlink"
|
32 |
|
|
|
|
|
|
|
|
|
|
|
33 |
# Ensure model exists and debug info
|
34 |
RUN echo "Debug: ls -la /app" && ls -la /app && \
|
35 |
echo "Debug: ls -la /app/src" && ls -la /app/src && \
|
|
|
30 |
# Create symlinks to ensure proper imports
|
31 |
RUN ln -sf /app/src /src || echo "Could not create symlink"
|
32 |
|
33 |
+
# Ensure chorus_detection package is properly installed
|
34 |
+
RUN cd /app && \
|
35 |
+
python -c "import chorus_detection; print(f'Successfully imported chorus_detection module from {chorus_detection.__file__}')" || \
|
36 |
+
echo "Warning: chorus_detection module not properly installed, will be addressed at runtime"
|
37 |
+
|
38 |
# Ensure model exists and debug info
|
39 |
RUN echo "Debug: ls -la /app" && ls -la /app && \
|
40 |
echo "Debug: ls -la /app/src" && ls -la /app/src && \
|
setup.py
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/usr/bin/env python3
|
2 |
+
# -*- coding: utf-8 -*-
|
3 |
+
|
4 |
+
from setuptools import setup, find_packages
|
5 |
+
|
6 |
+
setup(
|
7 |
+
name="chorus_detection",
|
8 |
+
version="0.1.0",
|
9 |
+
packages=find_packages(where="src"),
|
10 |
+
package_dir={"": "src"},
|
11 |
+
install_requires=[
|
12 |
+
# These are already in requirements.txt so no need to specify versions
|
13 |
+
"numpy",
|
14 |
+
"scipy",
|
15 |
+
"tqdm",
|
16 |
+
"tensorflow",
|
17 |
+
"keras",
|
18 |
+
"scikit-learn",
|
19 |
+
"librosa",
|
20 |
+
"soundfile",
|
21 |
+
"pydub",
|
22 |
+
"ffmpeg-python",
|
23 |
+
"yt-dlp",
|
24 |
+
"requests",
|
25 |
+
"matplotlib",
|
26 |
+
"streamlit",
|
27 |
+
"huggingface_hub",
|
28 |
+
],
|
29 |
+
python_requires=">=3.9",
|
30 |
+
)
|