Commit
β’
a27f130
1
Parent(s):
21b9047
Update share_btn.py
Browse files- share_btn.py +3 -2
share_btn.py
CHANGED
@@ -41,6 +41,7 @@ share_js = """async () => {
|
|
41 |
|
42 |
const inputPrompt = gradioEl.querySelector('#prompt textarea').value;
|
43 |
const negativePrompt = gradioEl.querySelector('#negative_prompt textarea').value;
|
|
|
44 |
const controlImage = gradioEl.querySelector('#control_image img');
|
45 |
const outputImgEl = gradioEl.querySelector('#output img');
|
46 |
|
@@ -62,7 +63,7 @@ share_js = """async () => {
|
|
62 |
### Prompt
|
63 |
- *Prompt*: ${inputPrompt}
|
64 |
- *Negative prompt*: ${negativePrompt}
|
65 |
-
|
66 |
#### Generated Image:
|
67 |
<img src="${urlInputImg}" />
|
68 |
|
@@ -75,7 +76,7 @@ share_js = """async () => {
|
|
75 |
preview: true
|
76 |
});
|
77 |
const paramsStr = params.toString();
|
78 |
-
window.open(`https://huggingface.co/spaces/
|
79 |
shareBtnEl.style.removeProperty('pointer-events');
|
80 |
shareIconEl.style.removeProperty('display');
|
81 |
loadingIconEl.style.display = 'none';
|
|
|
41 |
|
42 |
const inputPrompt = gradioEl.querySelector('#prompt textarea').value;
|
43 |
const negativePrompt = gradioEl.querySelector('#negative_prompt textarea').value;
|
44 |
+
const illusionStrength = gradioEl.querySelector('#illusion_strength input[type="number"]').value;
|
45 |
const controlImage = gradioEl.querySelector('#control_image img');
|
46 |
const outputImgEl = gradioEl.querySelector('#output img');
|
47 |
|
|
|
63 |
### Prompt
|
64 |
- *Prompt*: ${inputPrompt}
|
65 |
- *Negative prompt*: ${negativePrompt}
|
66 |
+
- *Illusion strength*: ${illusionStrength}
|
67 |
#### Generated Image:
|
68 |
<img src="${urlInputImg}" />
|
69 |
|
|
|
76 |
preview: true
|
77 |
});
|
78 |
const paramsStr = params.toString();
|
79 |
+
window.open(`https://huggingface.co/spaces/AP123/IllusionDiffusion/discussions/new?${paramsStr}`, '_blank');
|
80 |
shareBtnEl.style.removeProperty('pointer-events');
|
81 |
shareIconEl.style.removeProperty('display');
|
82 |
loadingIconEl.style.display = 'none';
|