ohollo commited on
Commit
05021ce
·
1 Parent(s): d4bbd3b

Build using Dockerfile rather than gradio default

Browse files
Files changed (4) hide show
  1. Dockerfile +42 -0
  2. README.md +2 -2
  3. app.py +3 -2
  4. requirements.txt +6 -0
Dockerfile ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11
2
+
3
+ # RUN pip install --no-cache-dir pip -U && \
4
+ # pip install --no-cache-dir \
5
+ # datasets \
6
+ # "huggingface-hub>=0.30" \
7
+ # "hf-transfer>=0.1.4" \
8
+ # "protobuf<4" \
9
+ # "click<8.1" \
10
+ # "pydantic~=1.0"
11
+
12
+ WORKDIR /app
13
+
14
+ # Copy project files
15
+ COPY . .
16
+ RUN apt-get update && apt-get install -y \
17
+ # git \
18
+ # git-lfs \
19
+ ffmpeg \
20
+ # libsm6 \
21
+ # libxext6 \
22
+ # cmake \
23
+ # rsync \
24
+ # libgl1 \
25
+ g++ \
26
+ libsndfile1 \
27
+ timidity \
28
+ && rm -rf /var/lib/apt/lists/*
29
+ # && git lfs install
30
+ # RUN apt-get update && \
31
+ # apt-get install -y curl && \
32
+ # curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
33
+ # apt-get install -y nodejs && \
34
+ # rm -rf /var/lib/apt/lists/* && \
35
+ # apt-get clean
36
+
37
+ # Install main requirements with no build isolation to fix numpy dependency issues
38
+ RUN pip install --no-cache-dir numpy==1.24.4 && pip install --no-cache-dir --no-build-isolation -r requirements.txt
39
+
40
+ EXPOSE 7860
41
+
42
+ CMD ["python", "app.py"]
README.md CHANGED
@@ -3,8 +3,8 @@ title: Harmonic Analysis
3
  emoji: 👁
4
  colorFrom: gray
5
  colorTo: blue
6
- sdk: gradio
7
- sdk_version: 5.49.1
8
  app_file: app.py
9
  pinned: false
10
  license: cc-by-nc-nd-4.0
 
3
  emoji: 👁
4
  colorFrom: gray
5
  colorTo: blue
6
+ sdk: docker
7
+ # sdk_version: 5.49.1
8
  app_file: app.py
9
  pinned: false
10
  license: cc-by-nc-nd-4.0
app.py CHANGED
@@ -112,7 +112,7 @@ def analyze_music_file(audio_file):
112
  )
113
 
114
  # Create Gradio interface
115
- with gr.Blocks(title="Harmonic Analysis Tool", theme=gr.themes.Soft()) as app:
116
  gr.Markdown("# 🎵 Harmonic Analysis Tool")
117
  gr.Markdown("Analyze chord progressions for originality and find similar songs in the database.")
118
 
@@ -191,5 +191,6 @@ if __name__ == "__main__":
191
  server_name="0.0.0.0",
192
  server_port=7860,
193
  share=False,
194
- show_error=True
 
195
  )
 
112
  )
113
 
114
  # Create Gradio interface
115
+ with gr.Blocks(title="Harmonic Analysis Tool") as app:
116
  gr.Markdown("# 🎵 Harmonic Analysis Tool")
117
  gr.Markdown("Analyze chord progressions for originality and find similar songs in the database.")
118
 
 
191
  server_name="0.0.0.0",
192
  server_port=7860,
193
  share=False,
194
+ show_error=True,
195
+ theme=gr.themes.Soft()
196
  )
requirements.txt ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ faiss-cpu
2
+ gradio==5.49.1
3
+ joblib
4
+ scikit-learn
5
+ chord-extractor
6
+ datasets