Spaces:
Running
Running
test sharing function
Browse files- utils/index.ts +1 -1
utils/index.ts
CHANGED
@@ -269,7 +269,7 @@ function writeString(view: any, offset: number, string: string) {
|
|
269 |
export const MODEL_ID = 'Xenova/musicgen-small';
|
270 |
|
271 |
export async function share(body: any, settings: Record<string, any>, results: Record<string, any>) {
|
272 |
-
const blobAudio = new Blob([body
|
273 |
const response = await fetch('https://huggingface.co/uploads', { method: 'POST', body: blobAudio });
|
274 |
if (!response.ok) throw new Error(`Failed to upload audio: ${response.statusText}`);
|
275 |
const url = await response.text();
|
|
|
269 |
export const MODEL_ID = 'Xenova/musicgen-small';
|
270 |
|
271 |
export async function share(body: any, settings: Record<string, any>, results: Record<string, any>) {
|
272 |
+
const blobAudio = new Blob([body], { type: 'audio/wav' });
|
273 |
const response = await fetch('https://huggingface.co/uploads', { method: 'POST', body: blobAudio });
|
274 |
if (!response.ok) throw new Error(`Failed to upload audio: ${response.statusText}`);
|
275 |
const url = await response.text();
|