Spaces:
Running
Running
fix loading
Browse files- components/form.tsx +3 -0
components/form.tsx
CHANGED
@@ -47,6 +47,7 @@ export const Form = ({ children }: { children: React.ReactNode }) => {
|
|
47 |
results,
|
48 |
loading,
|
49 |
randomize,
|
|
|
50 |
} = useGeneration();
|
51 |
|
52 |
const modelPromise = useRef(null);
|
@@ -174,6 +175,8 @@ export const Form = ({ children }: { children: React.ReactNode }) => {
|
|
174 |
disabled={loading || !modelLoaded}
|
175 |
onClick={() => {
|
176 |
if (loading || !modelLoaded) return;
|
|
|
|
|
177 |
generate();
|
178 |
generateMusic();
|
179 |
}}
|
|
|
47 |
results,
|
48 |
loading,
|
49 |
randomize,
|
50 |
+
setResults,
|
51 |
} = useGeneration();
|
52 |
|
53 |
const modelPromise = useRef(null);
|
|
|
175 |
disabled={loading || !modelLoaded}
|
176 |
onClick={() => {
|
177 |
if (loading || !modelLoaded) return;
|
178 |
+
setResults({ cover: null, title: null });
|
179 |
+
setTrack("");
|
180 |
generate();
|
181 |
generateMusic();
|
182 |
}}
|