Euan Ong commited on
Commit
0b6e377
·
1 Parent(s): 768c024

hacked around the 2img restriction

Browse files
Files changed (1) hide show
  1. serve/assets/index-188ef5e8.js +5 -13
serve/assets/index-188ef5e8.js CHANGED
@@ -1745,6 +1745,7 @@ async function $r(e, t = {
1745
  ...Y,
1746
  session_hash: g
1747
  }, o).then(async ([G, Z]) => {
 
1748
  if (b == 0) {
1749
  let idx = C[0];
1750
  let [img_url, user_prompt] = window.datasets[idx];
@@ -1776,15 +1777,14 @@ async function $r(e, t = {
1776
  queue: !1,
1777
  time: new Date
1778
  })
1779
- }).catch(G => {
1780
  if (b == 0) {
1781
  let idx = C[0];
1782
  let [img_url, user_prompt] = window.datasets[idx];
1783
  let img_blob = await imageURLToBase64(window.location.origin + img_url);
1784
- G.data[0] = img_blob
1785
- G.data[1] = user_prompt
1786
  const _ = a ? zt(G.data, I, d.root, d.root_url) : G.data;
1787
- Z == 200 ? (V({
1788
  type: "data",
1789
  endpoint: M,
1790
  fn_index: E,
@@ -1798,15 +1798,7 @@ async function $r(e, t = {
1798
  eta: G.average_duration,
1799
  queue: !1,
1800
  time: new Date
1801
- })) : V({
1802
- type: "status",
1803
- stage: "error",
1804
- endpoint: M,
1805
- fn_index: E,
1806
- message: G.error,
1807
- queue: !1,
1808
- time: new Date
1809
- })
1810
  } else {
1811
  V({
1812
  type: "status",
 
1745
  ...Y,
1746
  session_hash: g
1747
  }, o).then(async ([G, Z]) => {
1748
+ console.log(G)
1749
  if (b == 0) {
1750
  let idx = C[0];
1751
  let [img_url, user_prompt] = window.datasets[idx];
 
1777
  queue: !1,
1778
  time: new Date
1779
  })
1780
+ }).catch(async G => {
1781
  if (b == 0) {
1782
  let idx = C[0];
1783
  let [img_url, user_prompt] = window.datasets[idx];
1784
  let img_blob = await imageURLToBase64(window.location.origin + img_url);
1785
+ G = { average_duration: 0.00001, data: [img_blob, user_prompt], duration: 0.00001, is_generating: false }
 
1786
  const _ = a ? zt(G.data, I, d.root, d.root_url) : G.data;
1787
+ (V({
1788
  type: "data",
1789
  endpoint: M,
1790
  fn_index: E,
 
1798
  eta: G.average_duration,
1799
  queue: !1,
1800
  time: new Date
1801
+ }))
 
 
 
 
 
 
 
 
1802
  } else {
1803
  V({
1804
  type: "status",