Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -23,7 +23,8 @@ def process_email_wrapper(
|
|
| 23 |
max_tokens,
|
| 24 |
temperature,
|
| 25 |
top_p,
|
| 26 |
-
custom_guidelines
|
|
|
|
| 27 |
):
|
| 28 |
"""
|
| 29 |
Wrapper function to call the email processor with all necessary parameters.
|
|
@@ -40,7 +41,8 @@ def process_email_wrapper(
|
|
| 40 |
top_p,
|
| 41 |
PASSWORD,
|
| 42 |
CLIENTS,
|
| 43 |
-
custom_guidelines
|
|
|
|
| 44 |
)
|
| 45 |
|
| 46 |
def check_password(input_password):
|
|
@@ -153,6 +155,14 @@ with gr.Blocks(title="Email Assistant") as demo:
|
|
| 153 |
minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-p"
|
| 154 |
)
|
| 155 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 156 |
with gr.Row():
|
| 157 |
with gr.Column():
|
| 158 |
email_guidelines = gr.Textbox(
|
|
@@ -228,7 +238,8 @@ with gr.Blocks(title="Email Assistant") as demo:
|
|
| 228 |
max_tokens,
|
| 229 |
temperature,
|
| 230 |
top_p,
|
| 231 |
-
email_guidelines
|
|
|
|
| 232 |
],
|
| 233 |
outputs=[assistant_response, suggestions]
|
| 234 |
)
|
|
|
|
| 23 |
max_tokens,
|
| 24 |
temperature,
|
| 25 |
top_p,
|
| 26 |
+
custom_guidelines,
|
| 27 |
+
identity
|
| 28 |
):
|
| 29 |
"""
|
| 30 |
Wrapper function to call the email processor with all necessary parameters.
|
|
|
|
| 41 |
top_p,
|
| 42 |
PASSWORD,
|
| 43 |
CLIENTS,
|
| 44 |
+
custom_guidelines,
|
| 45 |
+
identity
|
| 46 |
)
|
| 47 |
|
| 48 |
def check_password(input_password):
|
|
|
|
| 155 |
minimum=0.1, maximum=1.0, value=0.95, step=0.05, label="Top-p"
|
| 156 |
)
|
| 157 |
|
| 158 |
+
with gr.Row():
|
| 159 |
+
identity = gr.Textbox(
|
| 160 |
+
value="",
|
| 161 |
+
label="Reply Identity (optional)",
|
| 162 |
+
placeholder="Enter the perspective this email is being written from (e.g., 'Sales Manager', 'Customer Support')",
|
| 163 |
+
lines=1
|
| 164 |
+
)
|
| 165 |
+
|
| 166 |
with gr.Row():
|
| 167 |
with gr.Column():
|
| 168 |
email_guidelines = gr.Textbox(
|
|
|
|
| 238 |
max_tokens,
|
| 239 |
temperature,
|
| 240 |
top_p,
|
| 241 |
+
email_guidelines,
|
| 242 |
+
identity
|
| 243 |
],
|
| 244 |
outputs=[assistant_response, suggestions]
|
| 245 |
)
|