Wayed11 commited on
Commit
024d8a8
·
verified ·
1 Parent(s): 939d803

Wheelie update

Browse files
Files changed (1) hide show
  1. create.html +3 -3
create.html CHANGED
@@ -46,7 +46,7 @@ header h1 b{color:#FF6FB5}
46
  <textarea id="p" rows="1" placeholder="What should Wheelie make?"></textarea>
47
  <button class="ib" id="mic" aria-label="Talk">🎤</button><button class="ib go" id="go" aria-label="Make it">↑</button></div></div>
48
  <script>
49
- const ENG='https://alexnasa-ltx-2-turbo.hf.space';
50
  const STYLE=' Vibrant 3D animated cartoon style, cinematic lighting, smooth expressive motion, rich synced sound effects and music.';
51
  const MODES={normal:'',fun:' Playful, bouncy, funny, energetic.',cine:' Epic cinematic camera move, dramatic lighting, film score.',custom:''};
52
  let mode='normal',img=null,wide=false,last=null;
@@ -68,10 +68,10 @@ async function make(text,startBlob){
68
  const ff=startBlob?await upload(startBlob,'start.png'):null;
69
  const prompt=text+(mode==='custom'?'':MODES[mode]+STYLE);
70
  const h=wide?512:768,w=wide?768:512;
71
- const r=await fetch(ENG+'/gradio_api/call/generate_video',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({data:[ff,null,prompt,null,ff?'Image-to-Video':'Text-to-Video',true,10,true,h,w,'No LoRA',null]})});
72
  const {event_id}=await r.json();if(!event_id)throw 0;
73
  msg.textContent='Rendering video and sound…';
74
- const s=await fetch(ENG+'/gradio_api/call/generate_video/'+event_id);const t=await s.text();
75
  const m=t.match(/event: complete\s*\ndata: (.*)/);if(!m)throw 0;
76
  const d=JSON.parse(m[1]);const v=(Array.isArray(d)?d[0]:d);const url=(v&&(v.url||(v.video&&v.video.url)))||'';
77
  if(!url)throw 0;
 
46
  <textarea id="p" rows="1" placeholder="What should Wheelie make?"></textarea>
47
  <button class="ib" id="mic" aria-label="Talk">🎤</button><button class="ib go" id="go" aria-label="Make it">↑</button></div></div>
48
  <script>
49
+ const ENG='https://wayed11-wheelie-ovi.hf.space';
50
  const STYLE=' Vibrant 3D animated cartoon style, cinematic lighting, smooth expressive motion, rich synced sound effects and music.';
51
  const MODES={normal:'',fun:' Playful, bouncy, funny, energetic.',cine:' Epic cinematic camera move, dramatic lighting, film score.',custom:''};
52
  let mode='normal',img=null,wide=false,last=null;
 
68
  const ff=startBlob?await upload(startBlob,'start.png'):null;
69
  const prompt=text+(mode==='custom'?'':MODES[mode]+STYLE);
70
  const h=wide?512:768,w=wide?768:512;
71
+ const r=await fetch(ENG+'/gradio_api/call/generate_scene',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({data:[prompt+' <AUDCAP>Clear synced voices, sound effects and music that match the scene.<ENDAUDCAP>',30,ff]})});
72
  const {event_id}=await r.json();if(!event_id)throw 0;
73
  msg.textContent='Rendering video and sound…';
74
+ const s=await fetch(ENG+'/gradio_api/call/generate_scene/'+event_id);const t=await s.text();
75
  const m=t.match(/event: complete\s*\ndata: (.*)/);if(!m)throw 0;
76
  const d=JSON.parse(m[1]);const v=(Array.isArray(d)?d[0]:d);const url=(v&&(v.url||(v.video&&v.video.url)))||'';
77
  if(!url)throw 0;