Update app.py
Browse files
app.py
CHANGED
@@ -15,11 +15,11 @@ from openai import OpenAI
|
|
15 |
load_dotenv()
|
16 |
|
17 |
|
18 |
-
fb_defaut_access_token="
|
19 |
-
fb_defaut_page_id="
|
20 |
-
lin_defaut_accesss_token="
|
21 |
-
lin_defaut_user_id="
|
22 |
-
defaut_api_key="
|
23 |
|
24 |
class MediaType(Enum):
|
25 |
IMAGE = "image"
|
@@ -583,14 +583,14 @@ if st.button("🚀 Lancer l'automatisation", type="primary"):
|
|
583 |
if not keyword_list:
|
584 |
st.error("Veuillez entrer au moins un mot-clé.")
|
585 |
elif not api_key:
|
586 |
-
api_key=defaut_api_key
|
587 |
-
|
588 |
elif not (fb_access_token and fb_page_id) and not (linkedin_access_token and linkedin_user_id):
|
589 |
-
fb_access_token=fb_defaut_access_token
|
590 |
-
fb_page_id=fb_defaut_page_id
|
591 |
-
linkedin_access_token=lin_defaut_accesss_token
|
592 |
-
linkedin_user_id=lin_defaut_user_id
|
593 |
-
|
594 |
else:
|
595 |
# Sauvegarde de la configuration
|
596 |
new_config = {
|
|
|
15 |
load_dotenv()
|
16 |
|
17 |
|
18 |
+
#fb_defaut_access_token=""
|
19 |
+
#fb_defaut_page_id=""
|
20 |
+
#lin_defaut_accesss_token=""
|
21 |
+
#lin_defaut_user_id=""
|
22 |
+
#defaut_api_key=""
|
23 |
|
24 |
class MediaType(Enum):
|
25 |
IMAGE = "image"
|
|
|
583 |
if not keyword_list:
|
584 |
st.error("Veuillez entrer au moins un mot-clé.")
|
585 |
elif not api_key:
|
586 |
+
#api_key=defaut_api_key
|
587 |
+
st.error("Veuillez configurer votre clé API")
|
588 |
elif not (fb_access_token and fb_page_id) and not (linkedin_access_token and linkedin_user_id):
|
589 |
+
#fb_access_token=fb_defaut_access_token
|
590 |
+
#fb_page_id=fb_defaut_page_id
|
591 |
+
#linkedin_access_token=lin_defaut_accesss_token
|
592 |
+
#linkedin_user_id=lin_defaut_user_id
|
593 |
+
st.error("Veuillez configurer au moins un réseau social")
|
594 |
else:
|
595 |
# Sauvegarde de la configuration
|
596 |
new_config = {
|