unim4er commited on
Commit
516f12f
1 Parent(s): 01aade4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -2,12 +2,14 @@ import gradio as gr
2
  import random as rd
3
  rand = rd.randint(0,9)
4
  def guess(num):
5
- reture 'เลขที่สุ่มได้ คือ '+str(rand)
6
  num = int(num)
7
  if num == rand:
8
  r = 'ทายถูกแล้ว'
9
  else:
10
  r = 'ลองกดใหม่นะ'
 
 
11
  with gr.Blocks() as myApp:
12
  with gr.Row():
13
  with gr.Column(scale=1):
 
2
  import random as rd
3
  rand = rd.randint(0,9)
4
  def guess(num):
5
+
6
  num = int(num)
7
  if num == rand:
8
  r = 'ทายถูกแล้ว'
9
  else:
10
  r = 'ลองกดใหม่นะ'
11
+
12
+ return 'เลขที่สุ่มได้ คือ '+str(rand)
13
  with gr.Blocks() as myApp:
14
  with gr.Row():
15
  with gr.Column(scale=1):