JeCabrera commited on
Commit
f4e4aff
verified
1 Parent(s): 5b596c0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -15
app.py CHANGED
@@ -11,22 +11,22 @@ genai.configure(api_key=os.getenv("GOOGLE_API_KEY"))
11
  def get_gemini_response(target_audience, product, product_mention, text_type, length, mood, model_choice):
12
  model = genai.GenerativeModel(model_choice)
13
 
14
- # Crear la instrucci贸n de menci贸n basada en la opci贸n seleccionada
15
- mention_instruction = ""
16
- if product_mention == "Directa":
17
- mention_instruction = f"""
18
- Directly introduce the product '{product}' as the clear solution to the problem the reader is facing. Ensure that the product is presented in a way that highlights its key benefits and demonstrates how it directly addresses the issue at hand. The mention should feel natural and seamlessly integrated into the narrative.
19
- """
20
- elif product_mention == "Indirecta":
21
- mention_instruction = f"""
22
- Subtly reference the product '{product}' as a potential solution to the reader's problem without naming it explicitly. Weave the product's core benefits into the description of how the reader can overcome the issue, creating an implicit connection between the solution and the product. Ensure the mention is subtle but clear enough to guide the reader towards the product.
23
- """
24
- elif product_mention == "Metaf贸rica":
25
- mention_instruction = f"""
26
- Introduce the product '{product}' using a metaphor, connecting it symbolically to the solution the reader needs. The metaphor should relate to the problem being discussed and should creatively suggest how the product offers a resolution without explicitly stating its name. The metaphor should evoke the benefits of the product in a memorable and thought-provoking way.
27
- """
28
 
29
- # Instrucci贸n espec铆fica para el tipo de texto
30
  format_instruction = ""
31
  if text_type == "Historia":
32
  format_instruction = """
 
11
  def get_gemini_response(target_audience, product, product_mention, text_type, length, mood, model_choice):
12
  model = genai.GenerativeModel(model_choice)
13
 
14
+ # Crear la instrucci贸n de menci贸n basada en la opci贸n seleccionada
15
+ mention_instruction = ""
16
+ if product_mention == "Directa":
17
+ mention_instruction = f"""
18
+ Directly introduce the product '{product}' as the clear solution to the problem the reader is facing. Ensure that the product is presented in a way that highlights its key benefits and demonstrates how it directly addresses the issue at hand. The mention should feel natural and seamlessly integrated into the narrative.
19
+ """
20
+ elif product_mention == "Indirecta":
21
+ mention_instruction = f"""
22
+ Subtly reference the product '{product}' as a potential solution to the reader's problem without naming it explicitly. Weave the product's core benefits into the description of how the reader can overcome the issue, creating an implicit connection between the solution and the product. Ensure the mention is subtle but clear enough to guide the reader towards the product.
23
+ """
24
+ elif product_mention == "Metaf贸rica":
25
+ mention_instruction = f"""
26
+ Introduce the product '{product}' using a metaphor, connecting it symbolically to the solution the reader needs. The metaphor should relate to the problem being discussed and should creatively suggest how the product offers a resolution without explicitly stating its name. The metaphor should evoke the benefits of the product in a memorable and thought-provoking way.
27
+ """
28
 
29
+ # Instrucci贸n espec铆fica para el tipo de texto
30
  format_instruction = ""
31
  if text_type == "Historia":
32
  format_instruction = """