Kake commited on
Commit
7fa930f
1 Parent(s): fe9f172

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -13,11 +13,11 @@ def guess(num):
13
  return r
14
 
15
  def answer():
16
- return 'เลขที่สุ่มได้คือ '+str(rand)
17
 
18
- def newRand():
19
  rand[0] = rd.randint(0,9)
20
- return str(rand)
21
 
22
  with gr.Blocks() as myApp:
23
  with gr.Row():
@@ -30,6 +30,6 @@ with gr.Blocks() as myApp:
30
 
31
  inp.change(guess,inp,out)
32
  btn.click(fn=answer,outputs=out)
33
- btn2.click(fn=newRand,output=out)
34
  myApp.launch()
35
 
 
13
  return r
14
 
15
  def answer():
16
+ return 'เลขที่สุ่มได้'+str(rand[0])
17
 
18
+ def newRand():
19
  rand[0] = rd.randint(0,9)
20
+ return 'สุ่มใหม่แล้วเด้ออ้าย'
21
 
22
  with gr.Blocks() as myApp:
23
  with gr.Row():
 
30
 
31
  inp.change(guess,inp,out)
32
  btn.click(fn=answer,outputs=out)
33
+ btn2.click(fn=newRand,outputs=out)
34
  myApp.launch()
35