Update app.py
Browse files
app.py
CHANGED
|
@@ -16,7 +16,7 @@ def generate_headlines(number_of_headlines, target_audience, product, temperatur
|
|
| 16 |
# Llama a la API de Claude para generar titulares
|
| 17 |
message = client.messages.create(
|
| 18 |
model="claude-3-5-sonnet-20240620",
|
| 19 |
-
max_tokens=
|
| 20 |
temperature=temperature, # Usa el valor del slider aquí
|
| 21 |
system="You are a world-class copywriter, with experience in creating hooks, headlines, and subject lines that immediately capture attention. Your skill lies in deeply understanding the emotions, desires, and challenges of a specific audience, allowing you to design personalized marketing strategies that resonate and motivate action. You know how to use proven structures to attract your target audience, generating interest and achieving a powerful connection that drives desired results in advertising and content campaigns.\n\nAnswer in Spanish.",
|
| 22 |
messages=[
|
|
@@ -54,14 +54,7 @@ with gr.Blocks(css=".gradio-container { background-color: #f8f8f8; }") as demo:
|
|
| 54 |
submit_btn = gr.Button("Generar Titulares")
|
| 55 |
|
| 56 |
with gr.Column(scale=2):
|
| 57 |
-
output = gr.
|
| 58 |
-
"""
|
| 59 |
-
<div id="result-container" style="background-color: #ffffff; padding: 10px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); max-height: 300px; overflow-y: auto;">
|
| 60 |
-
<p id="result-text" style="font-size: 16px; color: #333333;">Los titulares aparecerán aquí...</p>
|
| 61 |
-
</div>
|
| 62 |
-
""",
|
| 63 |
-
label="Titulares Generados"
|
| 64 |
-
)
|
| 65 |
|
| 66 |
submit_btn.click(
|
| 67 |
fn=gradio_generate_headlines,
|
|
|
|
| 16 |
# Llama a la API de Claude para generar titulares
|
| 17 |
message = client.messages.create(
|
| 18 |
model="claude-3-5-sonnet-20240620",
|
| 19 |
+
max_tokens=1000,
|
| 20 |
temperature=temperature, # Usa el valor del slider aquí
|
| 21 |
system="You are a world-class copywriter, with experience in creating hooks, headlines, and subject lines that immediately capture attention. Your skill lies in deeply understanding the emotions, desires, and challenges of a specific audience, allowing you to design personalized marketing strategies that resonate and motivate action. You know how to use proven structures to attract your target audience, generating interest and achieving a powerful connection that drives desired results in advertising and content campaigns.\n\nAnswer in Spanish.",
|
| 22 |
messages=[
|
|
|
|
| 54 |
submit_btn = gr.Button("Generar Titulares")
|
| 55 |
|
| 56 |
with gr.Column(scale=2):
|
| 57 |
+
output = gr.Textbox(label="Titulares Generados", lines=10, placeholder="Los titulares aparecerán aquí...")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
|
| 59 |
submit_btn.click(
|
| 60 |
fn=gradio_generate_headlines,
|