Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -67,6 +67,10 @@ def bulk_output(excel, pdf, progress: gr.Progress = gr.Progress(track_tqdm=True)
|
|
67 |
|
68 |
return "Emails have been drafted and saved as Word documents."
|
69 |
|
|
|
|
|
|
|
|
|
70 |
with gr.Blocks() as demo:
|
71 |
with gr.Tabs():
|
72 |
with gr.TabItem("Single Email"):
|
@@ -87,7 +91,7 @@ with gr.Blocks() as demo:
|
|
87 |
|
88 |
state = gr.State()
|
89 |
submit_btn.click(output, inputs=[pdf_input, text1, text2, text3, text4, text5, text6], outputs=[output_box, state])
|
90 |
-
write_btn.click(
|
91 |
|
92 |
with gr.TabItem("Batch Email"):
|
93 |
with gr.Row():
|
|
|
67 |
|
68 |
return "Emails have been drafted and saved as Word documents."
|
69 |
|
70 |
+
def generate_and_download(name, company, ai_email):
|
71 |
+
file_path = config.write_email(name, company, ai_email)
|
72 |
+
return file_path
|
73 |
+
|
74 |
with gr.Blocks() as demo:
|
75 |
with gr.Tabs():
|
76 |
with gr.TabItem("Single Email"):
|
|
|
91 |
|
92 |
state = gr.State()
|
93 |
submit_btn.click(output, inputs=[pdf_input, text1, text2, text3, text4, text5, text6], outputs=[output_box, state])
|
94 |
+
write_btn.click(generate_and_download, inputs=[text1, text2, state])
|
95 |
|
96 |
with gr.TabItem("Batch Email"):
|
97 |
with gr.Row():
|