KneeKhan commited on
Commit
177919e
·
1 Parent(s): c3caa05

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -67,6 +67,9 @@ def pre_query(sender, recipient, recipient_name, context, input, model_id):
67
 
68
  return
69
 
 
 
 
70
  demo = gr.Blocks()
71
 
72
  with demo:
@@ -94,10 +97,12 @@ with demo:
94
  with gr.Row():
95
  recipient_address = gr.Textbox(label="To", placeholder ="recipient's address")
96
  sender_address = gr.Textbox(label="From", placeholder ="your email address")
 
97
  send_email = gr.Button("Send email!")
98
 
99
  input_list = [sender, recipient, recipient_name, subject, dates, email, model_id]
100
-
101
  submit_button.click(pre_query, inputs = input_list, outputs=text_output)
 
102
 
103
  demo.launch(debug=True)
 
67
 
68
  return
69
 
70
+ def set_email_link(email, recipient_address, sender_address):
71
+ return "Bag o dicks"
72
+
73
  demo = gr.Blocks()
74
 
75
  with demo:
 
97
  with gr.Row():
98
  recipient_address = gr.Textbox(label="To", placeholder ="recipient's address")
99
  sender_address = gr.Textbox(label="From", placeholder ="your email address")
100
+ email_link = gr.Textbox(label="From", placeholder ="click after email")
101
  send_email = gr.Button("Send email!")
102
 
103
  input_list = [sender, recipient, recipient_name, subject, dates, email, model_id]
104
+
105
  submit_button.click(pre_query, inputs = input_list, outputs=text_output)
106
+ send_email.click(set_email_link, inputs = [text_output, recipient_address, sender_address], outputs = email_link)
107
 
108
  demo.launch(debug=True)