sonobit commited on
Commit
5ac28e2
·
1 Parent(s): 73c4cfd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -10,14 +10,14 @@ def guess(num):
10
  else:
11
  r = 'ลองกดใหม่นะ'
12
  return r
 
13
  def answer():
14
  return str(rand)
15
 
16
- def newRand():
17
- rand = rd.randint(0,9)
18
- return ''
19
-
20
  with gr.Blocks() as myApp:
 
 
 
21
  with gr.Row():
22
  with gr.Column(scale=1):
23
  inp = gr.Radio(choices=list(range(10)),label='เลือก 1 หมายเลข')
@@ -28,5 +28,5 @@ with gr.Blocks() as myApp:
28
 
29
  inp.change(guess,inp,out)
30
  btn.click(fn=answer,outputs=out)
31
- btn2.click(fn=newRand,inputs=None,outputs=out)
32
  myApp.launch()
 
10
  else:
11
  r = 'ลองกดใหม่นะ'
12
  return r
13
+
14
  def answer():
15
  return str(rand)
16
 
 
 
 
 
17
  with gr.Blocks() as myApp:
18
+ def newRand():
19
+ rand = rd.randint(0,9)
20
+ return ''
21
  with gr.Row():
22
  with gr.Column(scale=1):
23
  inp = gr.Radio(choices=list(range(10)),label='เลือก 1 หมายเลข')
 
28
 
29
  inp.change(guess,inp,out)
30
  btn.click(fn=answer,outputs=out)
31
+ btn2.click(fn=newRand,outputs=out)
32
  myApp.launch()