Update app.py
Browse files
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 |
-
|
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):
|