DGSpitzer commited on
Commit
50061e8
1 Parent(s): 88988e2

Update share_btn.py

Browse files
Files changed (1) hide show
  1. share_btn.py +5 -4
share_btn.py CHANGED
@@ -38,10 +38,11 @@ share_js = """async () => {
38
  const gradioEl = document.querySelector('body > gradio-app');
39
  const outputImgEl = gradioEl.querySelector('#output-img img');
40
 
41
- const outputImg_src = outputImgEl .src;
42
- const outputImg_name = outputImg_src.split('/').pop();
 
43
 
44
- let titleTxt = outputImg_name;
45
  if(titleTxt.length > 100){
46
  titleTxt = titleTxt.slice(0, 100) + ' ...';
47
  }
@@ -55,7 +56,7 @@ share_js = """async () => {
55
  const urlOutputImg = await uploadFile(outputFile);
56
 
57
  const descriptionMd = `#### Output Image:
58
- <img src='${urlOutputImg}' style='max-height: 350px;'>
59
  This is my cool character! Made with Cyberpunk Anime Diffusion AI!
60
  `;
61
  const params = new URLSearchParams({
 
38
  const gradioEl = document.querySelector('body > gradio-app');
39
  const outputImgEl = gradioEl.querySelector('#output-img img');
40
 
41
+ //const outputImg_src = outputImgEl.src;
42
+ //const outputImg_name = outputImg_src.split('/').pop();
43
+ //let titleTxt = outputImg_name;
44
 
45
+ let titleTxt = gradioEl.querySelector('#input-prompt > label > textarea').placeholder;
46
  if(titleTxt.length > 100){
47
  titleTxt = titleTxt.slice(0, 100) + ' ...';
48
  }
 
56
  const urlOutputImg = await uploadFile(outputFile);
57
 
58
  const descriptionMd = `#### Output Image:
59
+ <img src='${urlOutputImg}' style='min-height: 704px;'>
60
  This is my cool character! Made with Cyberpunk Anime Diffusion AI!
61
  `;
62
  const params = new URLSearchParams({