JeCabrera commited on
Commit
48cc36d
·
verified ·
1 Parent(s): 5a9a4db

Upload 9 files

Browse files
Files changed (2) hide show
  1. app.py +14 -0
  2. styles/main.css +11 -0
app.py CHANGED
@@ -407,6 +407,20 @@ if submit:
407
  <p>{generated_emails}</p>
408
  </div>
409
  """, unsafe_allow_html=True)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
410
  except ValueError as e:
411
  col2.error(f"Error: {str(e)}")
412
  else:
 
407
  <p>{generated_emails}</p>
408
  </div>
409
  """, unsafe_allow_html=True)
410
+
411
+ # Add download button with gradient styling
412
+ import datetime
413
+
414
+ # Get current timestamp for the filename
415
+ timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")
416
+
417
+ # Download button
418
+ st.download_button(
419
+ label="DESCARGAR EMAILS",
420
+ data=generated_emails,
421
+ file_name=f"emails_persuasivos_{timestamp}.txt",
422
+ mime="text/plain"
423
+ )
424
  except ValueError as e:
425
  col2.error(f"Error: {str(e)}")
426
  else:
styles/main.css CHANGED
@@ -64,4 +64,15 @@ div.stButton > button:hover {
64
  .results-container p em,
65
  .results-container p i {
66
  font-size: 1rem;
 
 
 
 
 
 
 
 
 
 
 
67
  }
 
64
  .results-container p em,
65
  .results-container p i {
66
  font-size: 1rem;
67
+ }
68
+
69
+ /* Download button styling */
70
+ .stDownloadButton button {
71
+ background: linear-gradient(to right, #FFD700, #FFA500);
72
+ color: black;
73
+ font-weight: bold;
74
+ border: none;
75
+ width: 80%;
76
+ margin: 0 auto;
77
+ display: block;
78
  }