Spaces:
Sleeping
Sleeping
import streamlit as st | |
import pandas as pd | |
import traceback | |
import backend | |
from lib.support.generate_email_support import render_gen_email | |
from lib.support.template_email_support import render_templates | |
from lib.support.user_profile_support import render_user_profile | |
st.set_page_config(page_title="Cold Email Generator", layout="wide") | |
# ------------------------------------- Custom CSS ------------------------------------------------------------- | |
st.markdown( | |
""" | |
<style> | |
.css-1d391kg { /* Adjust this class based on your Streamlit version */ | |
padding-left: 10px; | |
padding-right: 10px; | |
} | |
</style> | |
""", | |
unsafe_allow_html=True | |
) | |
# -------------------------------------------------------------------------------------------------- | |
def main(): | |
try: | |
if not st.session_state.get("excel_file"): | |
st.session_state.excel_file = "cold_email_data.xlsx" | |
st.title("Cold Email Generator") | |
if not st.session_state.get("user_id"): | |
render_user_profile() | |
else: | |
if not st.session_state.get("page"): | |
page = st.sidebar.radio("Navigate", ["Generate Email", "Template Emails", "User Profiles"]) | |
else: | |
page = st.session_state.page | |
if page == "Generate Email": | |
render_gen_email() | |
elif page == "Template Emails": | |
render_templates() | |
elif page == "User Profiles": | |
render_user_profile() | |
except Exception as err: | |
traceback.print_exc() | |
print(err) | |
if __name__ == "__main__": | |
main() | |