Update app.py
Browse files
app.py
CHANGED
@@ -414,7 +414,7 @@ Project Requirements: {user_input}"""
|
|
414 |
formatted_prompt = prompt.format(user_input=user_input)
|
415 |
|
416 |
response = client.chat.completions.create(
|
417 |
-
model="gpt-
|
418 |
messages=[
|
419 |
{"role": "system", "content": "You are an expert SEO professional. Follow the prompt instructions precisely. Use British English, be direct and actionable, think in first principles, and consider second and third-order consequences."},
|
420 |
{"role": "user", "content": formatted_prompt}
|
@@ -479,7 +479,7 @@ def create_interface():
|
|
479 |
"""
|
480 |
|
481 |
try:
|
482 |
-
if selected_model == "OpenAI GPT-
|
483 |
ai_response = seo_agent.call_openai(openai_key, prompt, user_input)
|
484 |
elif selected_model == "Claude 4 Sonnet" and claude_key.strip():
|
485 |
ai_response = seo_agent.call_claude(claude_key, prompt, user_input)
|
@@ -532,7 +532,7 @@ def create_interface():
|
|
532 |
label="OpenAI API Key",
|
533 |
type="password",
|
534 |
placeholder="sk-proj-...",
|
535 |
-
info="Required for GPT-
|
536 |
)
|
537 |
claude_key = gr.Textbox(
|
538 |
label="Claude API Key",
|
@@ -542,9 +542,9 @@ def create_interface():
|
|
542 |
)
|
543 |
|
544 |
selected_model = gr.Radio(
|
545 |
-
choices=["OpenAI GPT-
|
546 |
label="Select AI Model",
|
547 |
-
value="OpenAI GPT-
|
548 |
info="Choose your preferred AI model"
|
549 |
)
|
550 |
|
|
|
414 |
formatted_prompt = prompt.format(user_input=user_input)
|
415 |
|
416 |
response = client.chat.completions.create(
|
417 |
+
model="gpt-4.1", # Latest GPT model
|
418 |
messages=[
|
419 |
{"role": "system", "content": "You are an expert SEO professional. Follow the prompt instructions precisely. Use British English, be direct and actionable, think in first principles, and consider second and third-order consequences."},
|
420 |
{"role": "user", "content": formatted_prompt}
|
|
|
479 |
"""
|
480 |
|
481 |
try:
|
482 |
+
if selected_model == "OpenAI GPT-4.1" and openai_key.strip():
|
483 |
ai_response = seo_agent.call_openai(openai_key, prompt, user_input)
|
484 |
elif selected_model == "Claude 4 Sonnet" and claude_key.strip():
|
485 |
ai_response = seo_agent.call_claude(claude_key, prompt, user_input)
|
|
|
532 |
label="OpenAI API Key",
|
533 |
type="password",
|
534 |
placeholder="sk-proj-...",
|
535 |
+
info="Required for GPT-4.1 analysis"
|
536 |
)
|
537 |
claude_key = gr.Textbox(
|
538 |
label="Claude API Key",
|
|
|
542 |
)
|
543 |
|
544 |
selected_model = gr.Radio(
|
545 |
+
choices=["OpenAI GPT-4.1", "Claude 4 Sonnet"],
|
546 |
label="Select AI Model",
|
547 |
+
value="OpenAI GPT-4.1",
|
548 |
info="Choose your preferred AI model"
|
549 |
)
|
550 |
|