Update app.py
Browse files12345678910111213141516import gradio as grdef create_interface():title = "Empowering Everything with AI"subtitle = "We believe in empowering everything through the transformative power of AI. Just like a hydrangea, where many people come together to create a new society."description = "Join us in building a future where AI connects and enhances every aspect of life."image_path = "image.jpeg" # Path to the uploaded imagewith gr.Blocks() as demo:gr.Markdown(f"# {title}")gr.Markdown(subtitle)gr.Markdown(description)gr.Image(image_path)return demo123456789101112131415161718192021222324import gradio as grfrom PIL import Imagedef resize_image(input_path, output_path, size):with Image.open(input_path) as img:img = img.resize(size, Image.ANTIALIAS)img.save(output_path)def create_interface():title = "Empowering Everything with AI"subtitle = "We believe in empowering everything through the transformative power of AI. Just like a hydrangea, where many people come together to create a new society. \nJoin us in building a future where AI connects and enhances every aspect of life."input_image_path = "image.png"output_image_path = "resized_image.png"# Resize the imageresize_image(input_image_path, output_image_path, (300, 200)) # Adjust size as neededwith gr.Blocks() as demo:gr.Markdown(f"# {title}")gr.Markdown(subtitle)gr.Image(output_image_path)return demo
app.py+13-5