Download app.py from andrzej/lit-caffe: direct link, hf CLI and curl.
- Browser
- Download file 414 Bytes
-
https://huggingface.co/spaces/andrzej/lit-caffe/resolve/main/app.py
- Command line
-
hf download hf://spaces/andrzej/lit-caffe/app.py
-
curl -L -o app.py https://huggingface.co/spaces/andrzej/lit-caffe/resolve/main/app.py
414 Bytes
| import gradio as gr | |
| title = 'welcome to lit caffe' | |
| desc = 'try our amazing lattes, cappucinos, or expressos' | |
| def caffe(kawa, ilosc): | |
| menu = {'latte': 12, 'cappucino': 10, 'espresso': 8} | |
| rachunek = 'TOTAL: ' + str(ilosc*menu[kawa]) + ' pln' | |
| return rachunek | |
| iface = gr.Interface(fn=caffe, inputs=['text','number'], outputs='text', | |
| title=title, description=desc) | |
| iface.launch() |