hsienchen commited on
Commit
98556ba
1 Parent(s): 369c30a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -12
app.py CHANGED
@@ -64,22 +64,16 @@ def app2_response(text):
64
  return resp
65
 
66
  # gradio block
67
- with gr.Blocks(theme='snehilsanyal/scikit-learn') as app1:
68
  with gr.Column():
69
  image_box = gr.Image(type="filepath")
70
- btn = gr.Button("Make a Plan")
71
- outputbox = gr.Textbox(label="here are the plans...")
72
  btn2 = gr.Button("Send to My Mobile")
73
- outputbox2 = gr.Textbox(label="to mobile...")
74
 
75
- clicked = btn.click(app1_response,
76
- [image_box],
77
- outputbox
78
- )
79
- clicked = btn.click(app2_response,
80
- outputbox,
81
- outputbox2
82
- )
83
 
84
  gr.Markdown("""
85
  # Make a Plan #
 
64
  return resp
65
 
66
  # gradio block
67
+ with gr.Blocks() as app1:
68
  with gr.Column():
69
  image_box = gr.Image(type="filepath")
70
+ btn1 = gr.Button("Make a Plan")
71
+ out1 = gr.Textbox(label="here are the plans...")
72
  btn2 = gr.Button("Send to My Mobile")
73
+ out2 = gr.Textbox(label="from SMS gateway...")
74
 
75
+ btn1.click(fn=app1_response, inputs=[image_box], outputs=out1)
76
+ btn2.click(fn=app2_response, inputs=out1, outputs=out2)
 
 
 
 
 
 
77
 
78
  gr.Markdown("""
79
  # Make a Plan #