Spaces:
Sleeping
Sleeping
Download app.py from kulaaaaaaaaaaaaaaaaaaaaaa/GUI: direct link, hf CLI and curl.
- Browser
- Download file 556 Bytes
-
https://huggingface.co/spaces/kulaaaaaaaaaaaaaaaaaaaaaa/GUI/resolve/main/app.py
- Command line
-
hf download hf://spaces/kulaaaaaaaaaaaaaaaaaaaaaa/GUI/app.py
-
curl -L -o app.py https://huggingface.co/spaces/kulaaaaaaaaaaaaaaaaaaaaaa/GUI/resolve/main/app.py
556 Bytes
| import gradio as gr | |
| import random as rd | |
| rand =rd.randint(1,4) | |
| def guess(num): | |
| num = int(num) | |
| if num == rand: | |
| r = 'ทายถูกแล้ว' | |
| else: | |
| r = 'ลองกดใหม่นะ' | |
| return r | |
| with gr.Blocks() as myApp: | |
| with gr.Row(): | |
| with gr. Column(scale=1): | |
| inp = gr.Radio(choices=list(range(10)),label= 'เลือก 1 หมายเลข') | |
| with gr. Column(scale=1): | |
| out = gr.Textbox(label='ผลลัพธ์') | |
| inp.change(guess,inp,out) | |
| myApp.launch() |