Spaces:
Sleeping
Sleeping
File size: 520 Bytes
2855ebb 45132b0 2855ebb 45132b0 2855ebb 45132b0 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | 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()
|