enzostvs HF staff commited on
Commit
781c2a5
1 Parent(s): 8cf3257

test sharing function

Browse files
Files changed (1) hide show
  1. 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.audio], { 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();
 
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();