Bill_Calculator / app.py
Bushra346's picture
Update app.py
45132b0 verified
raw
history blame contribute delete
520 Bytes
import gradio as gr
def calculate_bill(total_amount, num_people):
per_person = total_amount / num_people
return f"Total Bill: {total_amount:.2f}\nEach person pays: {per_person:.2f}"
iface = gr.Interface(
fn=calculate_bill,
inputs=[
gr.Number(label="Total Bill Amount"),
gr.Number(label="Number of People"),
],
outputs="text",
title="Bill Split Calculator",
description="Enter the total bill amount and the number of people to split the bill equally."
)
iface.launch()