Download app.py from Hanjaewon/newspace: direct link, hf CLI and curl.
- Browser
- Download file 345 Bytes
-
https://huggingface.co/spaces/Hanjaewon/newspace/resolve/main/app.py
- Command line
-
hf download hf://spaces/Hanjaewon/newspace/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Hanjaewon/newspace/resolve/main/app.py
345 Bytes
| # 라이브러리 가져오기 | |
| import gradio as gr | |
| # 덧셈 함수 정의 | |
| def add_numbers(num1, num2): | |
| result = num1 + num2 | |
| return result | |
| # Gradio 인터페이스 정의 | |
| iface = gr.Interface(fn=add_numbers, inputs=['number', 'number'], outputs='number', live=True, title="덧셈 계산기") | |
| # Spaces에 배포 | |
| iface.launch(share=True) |