fffiloni commited on
Commit
3ff63c5
1 Parent(s): 2308e19

shared title format to 12 words max

Browse files
Files changed (1) hide show
  1. share_btn.py +2 -2
share_btn.py CHANGED
@@ -41,7 +41,7 @@ share_js = """async () => {
41
  const inputImgEl = gradioEl.querySelector('#image-in img');
42
  const outputTxt = gradioEl.querySelector('#story textarea').value;
43
  const wordsArray = outputTxt.split(" ");
44
- const firstSevenWords = wordsArray.slice(0, 7).join(" ");
45
 
46
  const shareBtnEl = gradioEl.querySelector('#share-btn');
47
  const shareIconEl = gradioEl.querySelector('#share-btn-share-icon');
@@ -64,7 +64,7 @@ share_js = """async () => {
64
  ${outputTxt}
65
  `;
66
  const params = new URLSearchParams({
67
- title: firstSevenWords,
68
  description: descriptionMd,
69
  });
70
  const paramsStr = params.toString();
 
41
  const inputImgEl = gradioEl.querySelector('#image-in img');
42
  const outputTxt = gradioEl.querySelector('#story textarea').value;
43
  const wordsArray = outputTxt.split(" ");
44
+ const firstWords = wordsArray.slice(0, 12).join(" ");
45
 
46
  const shareBtnEl = gradioEl.querySelector('#share-btn');
47
  const shareIconEl = gradioEl.querySelector('#share-btn-share-icon');
 
64
  ${outputTxt}
65
  `;
66
  const params = new URLSearchParams({
67
+ title: firstWords,
68
  description: descriptionMd,
69
  });
70
  const paramsStr = params.toString();