Upload app.py
Browse files
app.py
CHANGED
|
@@ -250,7 +250,7 @@ def analyze_email_complete(subject, preview_text, body_text, day_of_week, send_t
|
|
| 250 |
|
| 251 |
return output, context
|
| 252 |
|
| 253 |
-
def chatbot_response(user_message, context):
|
| 254 |
# Check if context exists
|
| 255 |
if not context or not isinstance(context, dict):
|
| 256 |
return "Please analyze an email first, then ask your question here."
|
|
@@ -304,6 +304,13 @@ day_options = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday
|
|
| 304 |
|
| 305 |
# Create Gradio interface
|
| 306 |
with gr.Blocks() as demo:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 307 |
with gr.Row():
|
| 308 |
with gr.Column():
|
| 309 |
subject = gr.Textbox(label="📧 Subject Line", placeholder="Enter your email subject line")
|
|
@@ -336,4 +343,4 @@ with gr.Blocks() as demo:
|
|
| 336 |
)
|
| 337 |
|
| 338 |
if __name__ == "__main__":
|
| 339 |
-
demo.launch()
|
|
|
|
| 250 |
|
| 251 |
return output, context
|
| 252 |
|
| 253 |
+
def def chatbot_response(user_message, history, context):
|
| 254 |
# Check if context exists
|
| 255 |
if not context or not isinstance(context, dict):
|
| 256 |
return "Please analyze an email first, then ask your question here."
|
|
|
|
| 304 |
|
| 305 |
# Create Gradio interface
|
| 306 |
with gr.Blocks() as demo:
|
| 307 |
+
gr.Markdown(
|
| 308 |
+
"""
|
| 309 |
+
# 🚀 Email Performance Predictor – Forks Over Knives
|
| 310 |
+
|
| 311 |
+
Predict your email’s open, click, and unsubscribe rates.
|
| 312 |
+
Get actionable, section-specific suggestions, content classification, and optimization advice from the chatbot below!
|
| 313 |
+
"""
|
| 314 |
with gr.Row():
|
| 315 |
with gr.Column():
|
| 316 |
subject = gr.Textbox(label="📧 Subject Line", placeholder="Enter your email subject line")
|
|
|
|
| 343 |
)
|
| 344 |
|
| 345 |
if __name__ == "__main__":
|
| 346 |
+
demo.launch()
|