chaoxu commited on
Commit
1cefa89
β€’
1 Parent(s): aa1245a

fix share btn bug

Browse files
Files changed (1) hide show
  1. share_btn.py +3 -3
share_btn.py CHANGED
@@ -29,16 +29,16 @@ share_js = """async () => {
29
  const imgId = Date.now() % 200;
30
  const isPng = imgEl.src.startsWith(`data:image/png`);
31
  if(isPng){
32
- const fileName = `sd-perception-${{imgId}}.png`;
33
  return new File([blob], fileName, { type: 'image/png' });
34
  }else{
35
- const fileName = `sd-perception-${{imgId}}.jpg`;
36
  return new File([blob], fileName, { type: 'image/jpeg' });
37
  }
38
  }
39
 
40
  const gradioEl = document.querySelector("gradio-app").shadowRoot || document.querySelector('body > gradio-app');
41
-
42
  const seed = gradioEl.querySelector('#seed input[type="number"]').value;
43
  const scale = gradioEl.querySelector('#scale input[type="number"]').value;
44
  const num_steps = gradioEl.querySelector('#num_steps input[type="number"]').value;
 
29
  const imgId = Date.now() % 200;
30
  const isPng = imgEl.src.startsWith(`data:image/png`);
31
  if(isPng){
32
+ const fileName = `zero123++_${{imgId}}.png`;
33
  return new File([blob], fileName, { type: 'image/png' });
34
  }else{
35
+ const fileName = `zero123++_${{imgId}}.jpg`;
36
  return new File([blob], fileName, { type: 'image/jpeg' });
37
  }
38
  }
39
 
40
  const gradioEl = document.querySelector("gradio-app").shadowRoot || document.querySelector('body > gradio-app');
41
+ const inputPrompt = "Multiviews generated by Zero123++"
42
  const seed = gradioEl.querySelector('#seed input[type="number"]').value;
43
  const scale = gradioEl.querySelector('#scale input[type="number"]').value;
44
  const num_steps = gradioEl.querySelector('#num_steps input[type="number"]').value;