Thanyarat commited on
Commit
8064482
1 Parent(s): fb62894

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -6,7 +6,7 @@ def guess (num):
6
  if num == rand:
7
  r = 'ทายถูกแล้ว'
8
  else:
9
- r = 'ลองกดใหม่นะ
10
  return r
11
  with gr.Bloks() as myApp:
12
  with gr.Row():
@@ -15,4 +15,5 @@ with gr.Bloks() as myApp:
15
  with gr.Column (scale=1):
16
  out = gr. Textbox(label='ผลลัพธ์')
17
  inp.change(guess,inp,out)
 
18
  myApp.launch()
 
6
  if num == rand:
7
  r = 'ทายถูกแล้ว'
8
  else:
9
+ r = 'ลองกดใหม่นะ'
10
  return r
11
  with gr.Bloks() as myApp:
12
  with gr.Row():
 
15
  with gr.Column (scale=1):
16
  out = gr. Textbox(label='ผลลัพธ์')
17
  inp.change(guess,inp,out)
18
+ btn.click(fn=answer,outputs=out)
19
  myApp.launch()