code refactor
This commit is contained in:
@@ -32,7 +32,6 @@ function PreviewPage() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Container maxWidth="md" sx={{ py: 4 }}>
|
<Container maxWidth="md" sx={{ py: 4 }}>
|
||||||
<p>Audio Classification: {audioClass || "No data received"}</p>
|
|
||||||
<StepperComponent activeStep={1} />
|
<StepperComponent activeStep={1} />
|
||||||
|
|
||||||
<Paper elevation={3} sx={{ p: 4, mt: 4 }}>
|
<Paper elevation={3} sx={{ p: 4, mt: 4 }}>
|
||||||
@@ -92,6 +91,7 @@ function PreviewPage() {
|
|||||||
controls
|
controls
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
|
<p>Audio Classification: {audioClass || "No data received"}</p>
|
||||||
</Box>
|
</Box>
|
||||||
) : (
|
) : (
|
||||||
<Typography color="error" sx={{ mt: 2 }}>
|
<Typography color="error" sx={{ mt: 2 }}>
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ function ProcessingPage() {
|
|||||||
processStep("/api/trim", () => {
|
processStep("/api/trim", () => {
|
||||||
if (response.audio_class === "Music") {
|
if (response.audio_class === "Music") {
|
||||||
processStep("/api/resample", () => {
|
processStep("/api/resample", () => {
|
||||||
processStep("/api/separate", () => setProgress(100), 100, "Separating sources into vocals, bass, drums and other...");
|
processStep("/api/separate", () => setProgress(100), 100, "Separating music into vocals, bass, drums and other...");
|
||||||
}, 75, "Resampling audio to 44100Hz...", { sr: "44100" });
|
}, 75, "Resampling audio to 44100Hz...", { sr: "44100" });
|
||||||
} else {
|
} else {
|
||||||
processStep("/api/noisereduce", () => setProgress(100), 100, "Reducing background noise from the audio...");
|
processStep("/api/noisereduce", () => setProgress(100), 100, "Reducing background noise from the audio...");
|
||||||
|
|||||||
Reference in New Issue
Block a user