fffiloni commited on
Commit
a3f6267
1 Parent(s): af37bf6

Update share_btn.py

Browse files
Files changed (1) hide show
  1. share_btn.py +14 -0
share_btn.py CHANGED
@@ -35,8 +35,11 @@ share_js = """async () => {
35
 
36
  const gradioEl = document.querySelector("gradio-app").shadowRoot || document.querySelector('body > gradio-app');
37
  const captionTxt = gradioEl.querySelector('#prompt-in textarea').value;
 
 
38
  const inputVidEl = gradioEl.querySelector('#input-vid video');
39
  const outputVideo = gradioEl.querySelector('#video-output video');
 
40
 
41
  const shareBtnEl = gradioEl.querySelector('#share-btn');
42
  const shareIconEl = gradioEl.querySelector('#share-btn-share-icon');
@@ -50,13 +53,24 @@ share_js = """async () => {
50
 
51
  const inputFile = await getVideoBlobFile(inputVidEl);
52
  const urlInputVid = await uploadFile(inputFile);
 
 
 
 
53
  const videoOutFile = await getVideoBlobFile(outputVideo);
54
  const dataOutputVid = await uploadFile(videoOutFile);
55
 
56
  const descriptionMd = `
 
 
 
 
57
  #### Video input:
58
  ${urlInputVid}
59
 
 
 
 
60
  #### ControlNet result:
61
  ${dataOutputVid}
62
  `;
35
 
36
  const gradioEl = document.querySelector("gradio-app").shadowRoot || document.querySelector('body > gradio-app');
37
  const captionTxt = gradioEl.querySelector('#prompt-in textarea').value;
38
+ const controlTask = gradioEl.querySelector('#controltask-in select').value;
39
+ const seedValue = gradioEl.querySelector('#seed-in input').value;
40
  const inputVidEl = gradioEl.querySelector('#input-vid video');
41
  const outputVideo = gradioEl.querySelector('#video-output video');
42
+ const outputPrepVideo = gradioEl.querySelector('#prep-video-output video');
43
 
44
  const shareBtnEl = gradioEl.querySelector('#share-btn');
45
  const shareIconEl = gradioEl.querySelector('#share-btn-share-icon');
53
 
54
  const inputFile = await getVideoBlobFile(inputVidEl);
55
  const urlInputVid = await uploadFile(inputFile);
56
+
57
+ const prepVideoOutFile = await getVideoBlobFile(outputPrepVideo);
58
+ const dataOutputPrepVid = await uploadFile(prepVideoOutFile);
59
+
60
  const videoOutFile = await getVideoBlobFile(outputVideo);
61
  const dataOutputVid = await uploadFile(videoOutFile);
62
 
63
  const descriptionMd = `
64
+ #### Settings
65
+ Prompt: ${captionTxt}
66
+ Control Task: ${controlTask} • Seed: ${seedValue}
67
+
68
  #### Video input:
69
  ${urlInputVid}
70
 
71
+ #### Preprcessor output:
72
+ ${dataOutputPrepVid}
73
+
74
  #### ControlNet result:
75
  ${dataOutputVid}
76
  `;