TedYeh
commited on
Commit
·
0cbca3d
1
Parent(s):
23ea43b
update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,14 @@
|
|
1 |
import gradio as gr
|
2 |
-
|
3 |
def cged_correction(sentence):
|
4 |
return sentence
|
5 |
|
6 |
-
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import gradio as gr
|
|
|
2 |
def cged_correction(sentence):
|
3 |
return sentence
|
4 |
|
5 |
+
with gr.Blocks() as demo:
|
6 |
+
#設定輸入元件
|
7 |
+
sent = gr.Textbox(label="Sentence")
|
8 |
+
# 設定輸出元件
|
9 |
+
output = gr.Textbox(label="Result")
|
10 |
+
#設定按鈕
|
11 |
+
greet_btn = gr.Button("Correction")
|
12 |
+
#設定按鈕點選事件
|
13 |
+
greet_btn.click(fn=cged_correction, inputs=name, outputs=output)
|
14 |
+
demo.launch()
|