coffee / app.py
laitkor's picture
Create app.py
f74464a verified
import gradio as gr
def gather_ingredients():
return "Gather Ingredients:\n- Coffee beans\n- Water\n- Milk (optional)\n- Sugar (optional)"
def equipment_needed():
return "Equipment Needed:\n- Coffee grinder\n- Coffee maker or French press\n- Mug"
def measure_and_grind():
return "Measure and Grind the Coffee Beans:\n- Use approximately 2 tablespoons of coffee beans per 6 ounces of water.\n- Grind the beans to a medium-coarse consistency."
def boil_water():
return "Boil Water:\n- Heat water to around 200°F (93°C)."
def brew_coffee():
return "Brew the Coffee:\n- If using a coffee maker, follow the manufacturer's instructions.\n- If using a French press, add the ground coffee to the press, pour hot water over it, stir, place the lid on, and let it steep for about 4 minutes before pressing down the plunger."
def serve_and_enjoy():
return "Serve and Enjoy:\n- Pour the brewed coffee into a mug.\n- Add milk and sugar if desired."
with gr.Blocks() as demo:
gr.Markdown("# Interactive Coffee Making Workflow")
with gr.Accordion("Step 1: Gather Ingredients", open=False):
gr.Markdown(gather_ingredients())
with gr.Accordion("Step 2: Equipment Needed", open=False):
gr.Markdown(equipment_needed())
with gr.Accordion("Step 3: Measure and Grind the Coffee Beans", open=False):
gr.Markdown(measure_and_grind())
with gr.Accordion("Step 4: Boil Water", open=False):
gr.Markdown(boil_water())
with gr.Accordion("Step 5: Brew the Coffee", open=False):
gr.Markdown(brew_coffee())
with gr.Accordion("Step 6: Serve and Enjoy", open=False):
gr.Markdown(serve_and_enjoy())
demo.launch()