Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -72,10 +72,10 @@ You can also try my sample audio.
|
|
72 |
|
73 |
# Tutorial penggunaan
|
74 |
tutorial = """
|
75 |
-
|
76 |
-
1.
|
77 |
-
2.
|
78 |
-
3.
|
79 |
4. Enjoy your song!
|
80 |
"""
|
81 |
|
@@ -84,7 +84,6 @@ with gr.Blocks() as interface:
|
|
84 |
gr.Markdown(f"<h1 style='text-align: center;'>{title}</h1>")
|
85 |
gr.Markdown("<h3 style='text-align: center;'>Hello! I'm Tigor Neilson Sinaga, with NIM 22.11.4725.<br>Welcome to my AI Chord Recognition project!</h3>")
|
86 |
gr.Markdown(f"<h3 style='text-align: center;'>{description}</p>")
|
87 |
-
gr.Markdown(f"<h3 style='text-align: center;'>{tutorial}</h3>") # Menambahkan tutorial penggunaan
|
88 |
|
89 |
audio_input = gr.Audio(type="filepath", label="Upload Audio (MP3/WAV)")
|
90 |
use_sample_button = gr.Button("Use Sample Audio", size="sm")
|
@@ -92,7 +91,10 @@ with gr.Blocks() as interface:
|
|
92 |
output_text = gr.Textbox(label="Predicted Chords", lines=5, placeholder="Chord predictions will appear here...")
|
93 |
|
94 |
use_sample_button.click(fn=lambda: sample_audio_path, inputs=[], outputs=audio_input)
|
95 |
-
predict_button.click(fn=predict_chords, inputs=audio_input, outputs=output_text, queue=True)
|
|
|
|
|
|
|
96 |
gr.Markdown("<p style='text-align: center; font-size: 12px; color: grey;'>This project is still under development and has not yet reached high accuracy.</p>")
|
97 |
|
98 |
interface.launch(share=True)
|
|
|
72 |
|
73 |
# Tutorial penggunaan
|
74 |
tutorial = """
|
75 |
+
Tutorial:
|
76 |
+
1. Upload your own audio or you can record one yourself.
|
77 |
+
2. Use the sample audio file we have provided if needed.
|
78 |
+
3. Run the prediction by clicking the "Predict Chords" button.
|
79 |
4. Enjoy your song!
|
80 |
"""
|
81 |
|
|
|
84 |
gr.Markdown(f"<h1 style='text-align: center;'>{title}</h1>")
|
85 |
gr.Markdown("<h3 style='text-align: center;'>Hello! I'm Tigor Neilson Sinaga, with NIM 22.11.4725.<br>Welcome to my AI Chord Recognition project!</h3>")
|
86 |
gr.Markdown(f"<h3 style='text-align: center;'>{description}</p>")
|
|
|
87 |
|
88 |
audio_input = gr.Audio(type="filepath", label="Upload Audio (MP3/WAV)")
|
89 |
use_sample_button = gr.Button("Use Sample Audio", size="sm")
|
|
|
91 |
output_text = gr.Textbox(label="Predicted Chords", lines=5, placeholder="Chord predictions will appear here...")
|
92 |
|
93 |
use_sample_button.click(fn=lambda: sample_audio_path, inputs=[], outputs=audio_input)
|
94 |
+
predict_button.click(fn=predict_chords, inputs=audio_input, outputs=output_text, queue=True)
|
95 |
+
|
96 |
+
gr.Markdown(f"<h2 style='text-align: center;'>{tutorial}</h3>") # Menambahkan tutorial penggunaan
|
97 |
+
|
98 |
gr.Markdown("<p style='text-align: center; font-size: 12px; color: grey;'>This project is still under development and has not yet reached high accuracy.</p>")
|
99 |
|
100 |
interface.launch(share=True)
|