Spaces:
Running
Running
Ilyas KHIAT
commited on
Commit
•
438effa
1
Parent(s):
2eff77d
execute prompts
Browse files
prompt.py
CHANGED
@@ -16,7 +16,7 @@ def get_prompts_list():
|
|
16 |
# Check if 'name', 'context', and 'text' are in df columns
|
17 |
if 'name' in df.columns and 'context' in df.columns and 'text' in df.columns:
|
18 |
# Filter prompts with id_context as 'rse' or 'transition'
|
19 |
-
df = df[df['id_context'].isin(['pour-accelerer-la-demarche-rse', 'pour-accelerer-la-demarche-transition-ecologique'])]
|
20 |
|
21 |
# Extract 'name' from 'context' dictionary
|
22 |
df['context'] = df['context'].apply(lambda x: x.get('name') if isinstance(x, dict) else x)
|
|
|
16 |
# Check if 'name', 'context', and 'text' are in df columns
|
17 |
if 'name' in df.columns and 'context' in df.columns and 'text' in df.columns:
|
18 |
# Filter prompts with id_context as 'rse' or 'transition'
|
19 |
+
df = df[df['id_context'].isin(['pour-accelerer-la-demarche-rse', 'pour-accelerer-la-demarche-transition-ecologique','ressources-humaines'])]
|
20 |
|
21 |
# Extract 'name' from 'context' dictionary
|
22 |
df['context'] = df['context'].apply(lambda x: x.get('name') if isinstance(x, dict) else x)
|