Spaces:
Sleeping
Sleeping
Update utils.py
Browse files
utils.py
CHANGED
|
@@ -83,10 +83,10 @@ def generate_seo_prompt(article_title, main_keyword, target_tone, associated_key
|
|
| 83 |
return prompt
|
| 84 |
|
| 85 |
|
| 86 |
-
def create_pipeline_fr(titre_article, mot_cle_principal, ton_cible):
|
| 87 |
# Initial AI API call
|
| 88 |
mots_cles_champ_lexical=generer_mots(titre_article,mot_cle_principal)
|
| 89 |
-
pp=generer_prompt_seo(titre_article, mot_cle_principal, ton_cible, mots_cles_champ_lexical)
|
| 90 |
rep = call_ai_api(pp)
|
| 91 |
# Second AI API call with additional elaboration request
|
| 92 |
prompt2 = f"D'après le prompt {pp}, j'ai eu le résultat suivant : {rep}. Élaborer plus que ça."
|
|
@@ -117,10 +117,10 @@ def create_pipeline_fr(titre_article, mot_cle_principal, ton_cible):
|
|
| 117 |
|
| 118 |
return rep6
|
| 119 |
|
| 120 |
-
def create_pipeline(article_title, main_keyword, target_tone):
|
| 121 |
# Initial AI API call
|
| 122 |
lexical_field_keywords=generate_words(article_title, main_keyword)
|
| 123 |
-
pp = generate_seo_prompt(article_title, main_keyword, target_tone, lexical_field_keywords)
|
| 124 |
|
| 125 |
rep = call_ai_api(pp)
|
| 126 |
|
|
|
|
| 83 |
return prompt
|
| 84 |
|
| 85 |
|
| 86 |
+
def create_pipeline_fr(titre_article, mot_cle_principal, ton_cible, optional_text):
|
| 87 |
# Initial AI API call
|
| 88 |
mots_cles_champ_lexical=generer_mots(titre_article,mot_cle_principal)
|
| 89 |
+
pp=generer_prompt_seo(titre_article, mot_cle_principal, ton_cible, mots_cles_champ_lexical,optional_text)
|
| 90 |
rep = call_ai_api(pp)
|
| 91 |
# Second AI API call with additional elaboration request
|
| 92 |
prompt2 = f"D'après le prompt {pp}, j'ai eu le résultat suivant : {rep}. Élaborer plus que ça."
|
|
|
|
| 117 |
|
| 118 |
return rep6
|
| 119 |
|
| 120 |
+
def create_pipeline(article_title, main_keyword, target_tone,optional_text):
|
| 121 |
# Initial AI API call
|
| 122 |
lexical_field_keywords=generate_words(article_title, main_keyword)
|
| 123 |
+
pp = generate_seo_prompt(article_title, main_keyword, target_tone, lexical_field_keywords,optional_text)
|
| 124 |
|
| 125 |
rep = call_ai_api(pp)
|
| 126 |
|