Update share_btn.py
Browse files- share_btn.py +5 -5
share_btn.py
CHANGED
|
@@ -39,7 +39,7 @@ share_js = """async () => {
|
|
| 39 |
//const gradioEl = document.querySelector('body > gradio-app');
|
| 40 |
const gradioEl = document.querySelector("gradio-app").shadowRoot;
|
| 41 |
|
| 42 |
-
|
| 43 |
|
| 44 |
const outputVideo = gradioEl.querySelector('#video_out video');
|
| 45 |
const outputVideo_src = gradioEl.querySelector('#video_out video').src;
|
|
@@ -63,14 +63,14 @@ share_js = """async () => {
|
|
| 63 |
shareIconEl.style.display = 'none';
|
| 64 |
loadingIconEl.style.removeProperty('display');
|
| 65 |
|
| 66 |
-
const videoFile = await
|
| 67 |
const dataOutputVideo = await uploadFile(videoFile);
|
| 68 |
|
| 69 |
-
|
| 70 |
-
//${whisper_input}
|
| 71 |
|
| 72 |
const descriptionMd = `
|
| 73 |
-
|
|
|
|
| 74 |
|
| 75 |
#### Video:
|
| 76 |
|
|
|
|
| 39 |
//const gradioEl = document.querySelector('body > gradio-app');
|
| 40 |
const gradioEl = document.querySelector("gradio-app").shadowRoot;
|
| 41 |
|
| 42 |
+
const whisper_input = gradioEl.querySelector('#text_inp textarea').value;
|
| 43 |
|
| 44 |
const outputVideo = gradioEl.querySelector('#video_out video');
|
| 45 |
const outputVideo_src = gradioEl.querySelector('#video_out video').src;
|
|
|
|
| 63 |
shareIconEl.style.display = 'none';
|
| 64 |
loadingIconEl.style.removeProperty('display');
|
| 65 |
|
| 66 |
+
const videoFile = await getOutputVideoFile(outputVideo);
|
| 67 |
const dataOutputVideo = await uploadFile(videoFile);
|
| 68 |
|
| 69 |
+
|
|
|
|
| 70 |
|
| 71 |
const descriptionMd = `
|
| 72 |
+
#### What i asked for:
|
| 73 |
+
${whisper_input}
|
| 74 |
|
| 75 |
#### Video:
|
| 76 |
|