JeCabrera commited on
Commit
c31a82c
·
verified ·
1 Parent(s): ca09899

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -11
app.py CHANGED
@@ -15,7 +15,6 @@ load_dotenv()
15
  # Configurar la API de Google
16
  genai.configure(api_key=os.getenv("GOOGLE_API_KEY"))
17
 
18
- # Create a reusable function for generation and display
19
  # Función auxiliar para mostrar el contenido generado y los botones de descarga
20
  def display_generated_content(col, generated_content, content_type):
21
  timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")
@@ -25,6 +24,7 @@ def display_generated_content(col, generated_content, content_type):
25
  download_label = "DESCARGAR GUIÓN DE WEBINAR ▶▶"
26
  file_name = f"guion_webinar_{timestamp}.txt"
27
  subheader_text = "Tu guión de webinar:"
 
28
  # Mostrar botón de descarga superior para guiones
29
  col.download_button(
30
  label=download_label,
@@ -34,17 +34,7 @@ def display_generated_content(col, generated_content, content_type):
34
  key=f"download_top_{content_type}"
35
  )
36
  else: # nombres
37
- download_label = "DESCARGAR NOMBRES DE WEBINAR ▶▶"
38
- file_name = f"nombres_webinar_{timestamp}.txt"
39
  subheader_text = "Tus nombres de webinar:"
40
- # Añadir botón de descarga para nombres de webinar
41
- col.download_button(
42
- label=download_label,
43
- data=generated_content,
44
- file_name=file_name,
45
- mime="text/plain",
46
- key=f"download_top_{content_type}"
47
- )
48
 
49
  # Mostrar el contenido generado
50
  col.subheader(subheader_text)
 
15
  # Configurar la API de Google
16
  genai.configure(api_key=os.getenv("GOOGLE_API_KEY"))
17
 
 
18
  # Función auxiliar para mostrar el contenido generado y los botones de descarga
19
  def display_generated_content(col, generated_content, content_type):
20
  timestamp = datetime.datetime.now().strftime("%Y%m%d_%H%M%S")
 
24
  download_label = "DESCARGAR GUIÓN DE WEBINAR ▶▶"
25
  file_name = f"guion_webinar_{timestamp}.txt"
26
  subheader_text = "Tu guión de webinar:"
27
+
28
  # Mostrar botón de descarga superior para guiones
29
  col.download_button(
30
  label=download_label,
 
34
  key=f"download_top_{content_type}"
35
  )
36
  else: # nombres
 
 
37
  subheader_text = "Tus nombres de webinar:"
 
 
 
 
 
 
 
 
38
 
39
  # Mostrar el contenido generado
40
  col.subheader(subheader_text)