Update main.py
Browse files
main.py
CHANGED
@@ -612,7 +612,7 @@ async def recuperation_contexte(getNote):
|
|
612 |
async def contexte(romeListArray):
|
613 |
#results = await API_FranceTravail(romeListArray)
|
614 |
results = await creation_liste_code_Rome_et_emplois(romeListArray)
|
615 |
-
results_df = results
|
616 |
finals = results_df[['intitule','typeContratLibelle','experienceLibelle','competences','qualitesProfessionnelles','salaire','lieuTravail','formations','description']].copy()
|
617 |
finals["lieuTravail"] = finals["lieuTravail"].apply(lambda x: x['libelle']).apply(lambda x: x[0:3]).apply(lambda x: x.strip())
|
618 |
emplois = results_df.values.tolist()
|
@@ -769,7 +769,7 @@ async def creation_liste_code_Rome_et_emplois(competence):
|
|
769 |
displayresults += '<tr><td>' + arrayresults[j][0] + '</td><td>' + arrayresults[j][1] + '</td><td>' + arrayresults[j][2] + '</td></tr>'
|
770 |
|
771 |
displayresults = '<table>'
|
772 |
-
await cl.Message(author="Datapcc : 🌐🌐🌐",content="<p>Voici le résultat de la recherche sémantique sur le catalogue Rome :</p>" +
|
773 |
|
774 |
results_df = results_df.drop_duplicates(subset=["codeRome"])
|
775 |
results_df = results_df.head(5)
|
@@ -830,7 +830,7 @@ async def API_France_Travail(romeListArray):
|
|
830 |
search_on_big_data = client.search(params=params)
|
831 |
results += search_on_big_data["resultats"]
|
832 |
results_df = pd.DataFrame(results)
|
833 |
-
return
|
834 |
|
835 |
@cl.step(type="llm")
|
836 |
async def IA():
|
|
|
612 |
async def contexte(romeListArray):
|
613 |
#results = await API_FranceTravail(romeListArray)
|
614 |
results = await creation_liste_code_Rome_et_emplois(romeListArray)
|
615 |
+
results_df = results
|
616 |
finals = results_df[['intitule','typeContratLibelle','experienceLibelle','competences','qualitesProfessionnelles','salaire','lieuTravail','formations','description']].copy()
|
617 |
finals["lieuTravail"] = finals["lieuTravail"].apply(lambda x: x['libelle']).apply(lambda x: x[0:3]).apply(lambda x: x.strip())
|
618 |
emplois = results_df.values.tolist()
|
|
|
769 |
displayresults += '<tr><td>' + arrayresults[j][0] + '</td><td>' + arrayresults[j][1] + '</td><td>' + arrayresults[j][2] + '</td></tr>'
|
770 |
|
771 |
displayresults = '<table>'
|
772 |
+
await cl.Message(author="Datapcc : 🌐🌐🌐",content="<p>Voici le résultat de la recherche sémantique sur le catalogue Rome :</p>" + displayresults).send()
|
773 |
|
774 |
results_df = results_df.drop_duplicates(subset=["codeRome"])
|
775 |
results_df = results_df.head(5)
|
|
|
830 |
search_on_big_data = client.search(params=params)
|
831 |
results += search_on_big_data["resultats"]
|
832 |
results_df = pd.DataFrame(results)
|
833 |
+
return results_df
|
834 |
|
835 |
@cl.step(type="llm")
|
836 |
async def IA():
|