Spaces:
Running
Running
take care of btn
Browse files- components/form.tsx +10 -2
components/form.tsx
CHANGED
|
@@ -163,13 +163,21 @@ export const Form = ({ children }: { children: React.ReactNode }) => {
|
|
| 163 |
</p>
|
| 164 |
</div>
|
| 165 |
<button
|
| 166 |
-
className=
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 167 |
onClick={() => {
|
|
|
|
| 168 |
generate();
|
| 169 |
generateMusic();
|
| 170 |
}}
|
| 171 |
>
|
| 172 |
-
Generate
|
| 173 |
</button>
|
| 174 |
{(loading || results?.title || results?.cover) && (
|
| 175 |
<div className="mt-6 space-y-6 flex flex-col">
|
|
|
|
| 163 |
</p>
|
| 164 |
</div>
|
| 165 |
<button
|
| 166 |
+
className={classNames(
|
| 167 |
+
"rounded-xl bg-stone-900/90 border-white/5 border px-6 py-3 font-semibold text-base text-white mt-6 hover:brightness-125 transition-all duration-200",
|
| 168 |
+
{
|
| 169 |
+
"animate-pulse": loading,
|
| 170 |
+
"opacity-50 !cursor-not-allowed": !modelLoaded,
|
| 171 |
+
}
|
| 172 |
+
)}
|
| 173 |
+
disabled={loading || !modelLoaded}
|
| 174 |
onClick={() => {
|
| 175 |
+
if (loading || !modelLoaded) return;
|
| 176 |
generate();
|
| 177 |
generateMusic();
|
| 178 |
}}
|
| 179 |
>
|
| 180 |
+
{!modelLoaded ? "Waiting for model loaded" : "Generate music"}
|
| 181 |
</button>
|
| 182 |
{(loading || results?.title || results?.cover) && (
|
| 183 |
<div className="mt-6 space-y-6 flex flex-col">
|