Spaces:
Paused
Paused
shared title format to 12 words max
Browse files- 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
|
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:
|
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();
|