AjaykumarPilla commited on
Commit
046ab00
·
verified ·
1 Parent(s): 281d122

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +43 -0
app.py ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ import gradio as gr
3
+
4
+ # Sample popcorn product data
5
+ popcorn_data = [
6
+ {
7
+ "name": "Cheese Popcorn",
8
+ "image": "https://upload.wikimedia.org/wikipedia/commons/8/89/Cheddar_cheese_popcorn.jpg",
9
+ "price": "$4.99",
10
+ "sizes": ["Small", "Medium", "Large"]
11
+ },
12
+ {
13
+ "name": "Caramel Popcorn",
14
+ "image": "https://upload.wikimedia.org/wikipedia/commons/a/a4/Caramelcorn.jpg",
15
+ "price": "$5.99",
16
+ "sizes": ["Small", "Medium", "Large"]
17
+ },
18
+ {
19
+ "name": "Butter Popcorn",
20
+ "image": "https://upload.wikimedia.org/wikipedia/commons/f/fc/Popcorn_in_bowl.jpg",
21
+ "price": "$3.99",
22
+ "sizes": ["Small", "Medium", "Large"]
23
+ },
24
+ {
25
+ "name": "Spicy Popcorn",
26
+ "image": "https://upload.wikimedia.org/wikipedia/commons/0/0e/Spicy_popcorn.jpg",
27
+ "price": "$6.49",
28
+ "sizes": ["Small", "Medium", "Large"]
29
+ },
30
+ ]
31
+
32
+ with gr.Blocks() as demo:
33
+ gr.Markdown("# 🍿 Welcome to the Popcorn Store")
34
+ gr.Markdown("Explore our delicious popcorn flavors below:")
35
+
36
+ with gr.Row():
37
+ for item in popcorn_data:
38
+ with gr.Column():
39
+ gr.Image(value=item["image"], label=item["name"])
40
+ gr.Markdown(f"**Price**: {item['price']}
41
+ **Sizes**: {', '.join(item['sizes'])}")
42
+
43
+ demo.launch()