Update app.py
Browse files
app.py
CHANGED
|
@@ -1,24 +1,16 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
-
from PIL import Image
|
| 3 |
-
|
| 4 |
-
def resize_image(input_path, output_path, size):
|
| 5 |
-
with Image.open(input_path) as img:
|
| 6 |
-
img = img.resize(size, Image.ANTIALIAS)
|
| 7 |
-
img.save(output_path)
|
| 8 |
|
| 9 |
def create_interface():
|
| 10 |
title = "Empowering Everything with AI"
|
| 11 |
-
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.
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
# Resize the image
|
| 16 |
-
resize_image(input_image_path, output_image_path, (150, 100)) # Adjust size as needed
|
| 17 |
|
| 18 |
with gr.Blocks() as demo:
|
| 19 |
gr.Markdown(f"# {title}")
|
| 20 |
gr.Markdown(subtitle)
|
| 21 |
-
gr.
|
|
|
|
| 22 |
|
| 23 |
return demo
|
| 24 |
|
|
|
|
| 1 |
import gradio as gr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
def create_interface():
|
| 4 |
title = "Empowering Everything with AI"
|
| 5 |
+
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."
|
| 6 |
+
description = "Join us in building a future where AI connects and enhances every aspect of life."
|
| 7 |
+
image_path = "image.jpeg" # Path to the uploaded image
|
|
|
|
|
|
|
|
|
|
| 8 |
|
| 9 |
with gr.Blocks() as demo:
|
| 10 |
gr.Markdown(f"# {title}")
|
| 11 |
gr.Markdown(subtitle)
|
| 12 |
+
gr.Markdown(description)
|
| 13 |
+
gr.Image(image_path)
|
| 14 |
|
| 15 |
return demo
|
| 16 |
|