fffiloni commited on
Commit
fcdc30c
1 Parent(s): 2dba1b9

Update share_btn.py

Browse files
Files changed (1) hide show
  1. share_btn.py +3 -2
share_btn.py CHANGED
@@ -25,7 +25,7 @@ share_js = """async () => {
25
 
26
  async function getOutputVideoFile(videoURL){
27
 
28
- fetch(videoURL, { mode: 'no-cors'})
29
  .then(response => response.blob())
30
  .then(blob => {
31
  // do something with the blob;
@@ -45,6 +45,7 @@ share_js = """async () => {
45
  const whisper_input = gradioEl.querySelector('#text_inp textarea').value;
46
  const outputVideo = gradioEl.querySelector('#video_out video');
47
  const outputVideo_src = gradioEl.querySelector('#video_out video').src;
 
48
  const outputVideo_name = outputVideo_src.split('/').pop();
49
  const video_url = `https://fffiloni-gpt-talking-portrait.hf.space/file=https://fffiloni-one-shot-talking-face.hf.space/file=/tmp/${outputVideo_name}`;
50
 
@@ -66,7 +67,7 @@ share_js = """async () => {
66
  loadingIconEl.style.removeProperty('display');
67
 
68
  const videoFile = await getOutputVideoFile(outputVideo_src);
69
- const dataOutputVideo = await uploadFile(videoFile);
70
 
71
 
72
  const descriptionMd = `
 
25
 
26
  async function getOutputVideoFile(videoURL){
27
 
28
+ fetch(videoURL)
29
  .then(response => response.blob())
30
  .then(blob => {
31
  // do something with the blob;
 
45
  const whisper_input = gradioEl.querySelector('#text_inp textarea').value;
46
  const outputVideo = gradioEl.querySelector('#video_out video');
47
  const outputVideo_src = gradioEl.querySelector('#video_out video').src;
48
+ console.log(outputVideo_src)
49
  const outputVideo_name = outputVideo_src.split('/').pop();
50
  const video_url = `https://fffiloni-gpt-talking-portrait.hf.space/file=https://fffiloni-one-shot-talking-face.hf.space/file=/tmp/${outputVideo_name}`;
51
 
 
67
  loadingIconEl.style.removeProperty('display');
68
 
69
  const videoFile = await getOutputVideoFile(outputVideo_src);
70
+ //const dataOutputVideo = await uploadFile(videoFile);
71
 
72
 
73
  const descriptionMd = `