Spaces:
Paused
Paused
Added prompts to share community
Browse files- share_btn.py +4 -0
share_btn.py
CHANGED
@@ -57,6 +57,7 @@ share_js = """async () => {
|
|
57 |
const gradioEl = document.querySelector('body > gradio-app');
|
58 |
// const gradioEl = document.querySelector("gradio-app").shadowRoot;
|
59 |
const inputImgEl = gradioEl.querySelector('#input-img img');
|
|
|
60 |
const outputMusic = gradioEl.querySelector('#music-output audio');
|
61 |
const outputMusic_src = gradioEl.querySelector('#music-output audio').src;
|
62 |
const outputMusic_name = outputMusic_src.split('/').pop();
|
@@ -81,6 +82,9 @@ share_js = """async () => {
|
|
81 |
const descriptionMd = `#### Input img:
|
82 |
<img src='${urlInputImg}' style='max-height: 350px;'>
|
83 |
|
|
|
|
|
|
|
84 |
#### Music:
|
85 |
|
86 |
<audio controls>
|
|
|
57 |
const gradioEl = document.querySelector('body > gradio-app');
|
58 |
// const gradioEl = document.querySelector("gradio-app").shadowRoot;
|
59 |
const inputImgEl = gradioEl.querySelector('#input-img img');
|
60 |
+
const prompts = gradioEl.querySelector('#prompt-in textarea').value;
|
61 |
const outputMusic = gradioEl.querySelector('#music-output audio');
|
62 |
const outputMusic_src = gradioEl.querySelector('#music-output audio').src;
|
63 |
const outputMusic_name = outputMusic_src.split('/').pop();
|
|
|
82 |
const descriptionMd = `#### Input img:
|
83 |
<img src='${urlInputImg}' style='max-height: 350px;'>
|
84 |
|
85 |
+
#### Prompts out:
|
86 |
+
${prompts}
|
87 |
+
|
88 |
#### Music:
|
89 |
|
90 |
<audio controls>
|