YaohuiW commited on
Commit
49b1d7c
·
verified ·
1 Parent(s): c31dd6c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -16
app.py CHANGED
@@ -17,19 +17,26 @@ def update(name):
17
  return f"Welcome to Gradio, {name}!"
18
 
19
 
20
- with gr.Blocks() as demo:
21
- gr.Markdown("Start typing below and then click **Run** to see the output.")
22
- with gr.Row():
23
- inp = gr.Textbox(placeholder="What is your name?")
24
- out = gr.Textbox()
25
- btn = gr.Button("Run")
26
- btn.click(fn=update, inputs=inp, outputs=out)
27
-
28
-
29
- demo.launch(
30
- server_name='0.0.0.0',
31
- #server_port=7803,
32
- #server_port=10008,
33
- share=True,
34
- allowed_paths=["./data/source","./data/driving"]
35
- )
 
 
 
 
 
 
 
 
17
  return f"Welcome to Gradio, {name}!"
18
 
19
 
20
+ # with gr.Blocks() as demo:
21
+ # gr.Markdown("Start typing below and then click **Run** to see the output.")
22
+ # with gr.Row():
23
+ # inp = gr.Textbox(placeholder="What is your name?")
24
+ # out = gr.Textbox()
25
+ # btn = gr.Button("Run")
26
+ # btn.click(fn=update, inputs=inp, outputs=out)
27
+
28
+
29
+ # demo.launch(
30
+ # server_name='0.0.0.0',
31
+ # #server_port=7803,
32
+ # #server_port=10008,
33
+ # share=True,
34
+ # allowed_paths=["./data/source","./data/driving"]
35
+ # )
36
+
37
+
38
+ gr.Interface(
39
+ fn=update,
40
+ inputs=gr.Text(),
41
+ outputs=gr.Text(),
42
+ ).launch()