Spaces:
Sleeping
Sleeping
Update app.py
Browse files1223478 unmodified lines8384858788898687888990919293import gradio as grfrom cart_tab import add_to_cart, display_cart
# Global variables for cart and menu datacart = []78 unmodified lines document.getElementById("overlay").style.display = "none"; }
function addToCart(name) { google.colab.kernel.invokeFunction('notebook.add_to_cart', [name], {}); closePopup(); // Automatically close the popup async function addToCart(name) { // Call the Gradio backend function to add item to the cart const response = await google.colab.kernel.invokeFunction('notebook.add_to_cart', [name], {}); alert(response.data); // Show a success message closePopup(); // Close the popup }</script>"""app.py+5-4