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