DSatishchandra commited on
Commit
6386f31
·
verified ·
1 Parent(s): cddc1b8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -139,7 +139,7 @@ def app():
139
  document.getElementById('modal-image').src = image;
140
  document.getElementById('modal-name').innerText = name;
141
  document.getElementById('modal-description').innerText = description;
142
- document.getElementById('modal-price').innerText = $${price};
143
  }
144
  function closeModal() {
145
  const modal = document.getElementById('modal');
@@ -157,7 +157,7 @@ def app():
157
  headers: { "Content-Type": "application/json" },
158
  body: JSON.stringify(cart)
159
  });
160
- alert(${name} added to cart!);
161
  closeModal();
162
  }
163
  </script>
@@ -176,4 +176,4 @@ def app():
176
 
177
  if __name__ == "__main__":
178
  demo = app()
179
- demo.launch()
 
139
  document.getElementById('modal-image').src = image;
140
  document.getElementById('modal-name').innerText = name;
141
  document.getElementById('modal-description').innerText = description;
142
+ document.getElementById('modal-price').innerText = `$${price}`;
143
  }
144
  function closeModal() {
145
  const modal = document.getElementById('modal');
 
157
  headers: { "Content-Type": "application/json" },
158
  body: JSON.stringify(cart)
159
  });
160
+ alert(`${name} added to cart!`);
161
  closeModal();
162
  }
163
  </script>
 
176
 
177
  if __name__ == "__main__":
178
  demo = app()
179
+ demo.launch()