Spaces:
Sleeping
Sleeping
Commit ·
93ed4be
verified ·
0
Parent(s):
initial commit
Browse files- .gitattributes +35 -0
- README.md +13 -0
- app.py +72 -0
- requirements.txt +0 -0
.gitattributes
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: MiniCapstone 2
|
| 3 |
+
emoji: 🏆
|
| 4 |
+
colorFrom: indigo
|
| 5 |
+
colorTo: green
|
| 6 |
+
sdk: gradio
|
| 7 |
+
sdk_version: 5.1.0
|
| 8 |
+
app_file: app.py
|
| 9 |
+
pinned: false
|
| 10 |
+
short_description: 100x Enchancing EmailGenie
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
app.py
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
import pandas as pd
|
| 3 |
+
|
| 4 |
+
# Function to generate email
|
| 5 |
+
def generate_email(recipient_name, recipient_role, company_name, industry):
|
| 6 |
+
return (f"Hello {recipient_name},\n\n"
|
| 7 |
+
f"I hope this email finds you well. My name is Niket, and I'm reaching out to you regarding opportunities at {company_name} in the {industry} sector. "
|
| 8 |
+
"I believe we could explore potential collaboration. Would you be available for a coffee chat next week?\n\n"
|
| 9 |
+
"Looking forward to hearing from you!\n\n"
|
| 10 |
+
"Best,\nNiket")
|
| 11 |
+
|
| 12 |
+
# Function to save user profile to Excel
|
| 13 |
+
def save_user_profile(industry, target_audience, personal_info):
|
| 14 |
+
try:
|
| 15 |
+
df = pd.read_excel("user_profiles.xlsx")
|
| 16 |
+
except FileNotFoundError:
|
| 17 |
+
df = pd.DataFrame(columns=["Industry", "Target Audience", "Personal Info"])
|
| 18 |
+
|
| 19 |
+
new_profile = pd.DataFrame({
|
| 20 |
+
"Industry": [industry],
|
| 21 |
+
"Target Audience": [target_audience],
|
| 22 |
+
"Personal Info": [personal_info]
|
| 23 |
+
})
|
| 24 |
+
|
| 25 |
+
df = pd.concat([df, new_profile], ignore_index=True)
|
| 26 |
+
df.to_excel("user_profiles.xlsx", index=False)
|
| 27 |
+
|
| 28 |
+
# Placeholder function for connecting to email client
|
| 29 |
+
def connect_email_client(email_service):
|
| 30 |
+
return f"Connected to {email_service} successfully!"
|
| 31 |
+
|
| 32 |
+
# Placeholder function for analytics
|
| 33 |
+
def get_analytics():
|
| 34 |
+
return "Analytics data: Open rates, response rates, conversion metrics..."
|
| 35 |
+
|
| 36 |
+
# Gradio UI
|
| 37 |
+
with gr.Blocks() as demo:
|
| 38 |
+
gr.Markdown("# EmailGenie - Your AI Email Generator")
|
| 39 |
+
|
| 40 |
+
# User Profile Setup
|
| 41 |
+
gr.Markdown("### User Profile Setup")
|
| 42 |
+
industry = gr.Textbox(label="Industry", placeholder="Enter your industry")
|
| 43 |
+
target_audience = gr.Textbox(label="Target Audience", placeholder="Who are you targeting?")
|
| 44 |
+
personal_info = gr.Textbox(label="Personal Info", placeholder="Any relevant personal info")
|
| 45 |
+
save_button = gr.Button("Save Profile")
|
| 46 |
+
save_button.click(fn=save_user_profile, inputs=[industry, target_audience, personal_info])
|
| 47 |
+
|
| 48 |
+
# Email Generation Section
|
| 49 |
+
gr.Markdown("### Generate Your Email")
|
| 50 |
+
recipient_name = gr.Textbox(label="Recipient's Name", placeholder="Enter the recipient's name")
|
| 51 |
+
recipient_role = gr.Textbox(label="Recipient's Role", placeholder="Enter the recipient's role")
|
| 52 |
+
company_name = gr.Textbox(label="Company Name", placeholder="Enter the company name")
|
| 53 |
+
output = gr.Textbox(label="Generated Email", interactive=False)
|
| 54 |
+
|
| 55 |
+
generate_button = gr.Button("Generate Email")
|
| 56 |
+
generate_button.click(fn=generate_email, inputs=[recipient_name, recipient_role, company_name, industry], outputs=output)
|
| 57 |
+
|
| 58 |
+
# Connect Email Client Section
|
| 59 |
+
gr.Markdown("### Connect Email Client")
|
| 60 |
+
email_service = gr.Dropdown(label="Select Email Client", choices=["SendGrid", "Resend"])
|
| 61 |
+
connect_button = gr.Button("Connect Email Client")
|
| 62 |
+
connect_output = gr.Textbox(label="Connection Status", interactive=False) # Create output component
|
| 63 |
+
|
| 64 |
+
connect_button.click(fn=connect_email_client, inputs=[email_service], outputs=connect_output) # Updated outputs
|
| 65 |
+
|
| 66 |
+
# Analytics Dashboard Section
|
| 67 |
+
gr.Markdown("### Email Analytics")
|
| 68 |
+
analytics_button = gr.Button("Get Analytics")
|
| 69 |
+
analytics_output = gr.Textbox(label="Analytics Output", interactive=False)
|
| 70 |
+
analytics_button.click(fn=get_analytics, inputs=[], outputs=analytics_output)
|
| 71 |
+
|
| 72 |
+
demo.launch()
|
requirements.txt
ADDED
|
File without changes
|