import gradio as gr import json def load_products(): try: with open('products.json', 'r') as f: products = json.load(f) return products except Exception as e: print(f"Error loading products: {e}") return None def show_products(): products = load_products() if not products: return "
{product['details']}
Price: ${product['price']}