cdupland commited on
Commit
d5511b8
·
1 Parent(s): b3e5484

chore: Update prompt.py to improve prompts list layout and functionality

Browse files
Files changed (1) hide show
  1. prompt.py +2 -5
prompt.py CHANGED
@@ -41,21 +41,18 @@ def get_prompts_list():
41
 
42
  with st.expander(name):
43
  for i, row in group.iterrows():
44
- col1, col3, col4 = st.columns((0.4, 3, 3))
45
  col1.write(num) # index
46
  # col2.write(row['name']) # name
47
  col3.write(row['text']) # text
48
  num += 1
49
 
50
  button_phold = col4.empty() # create a placeholder
51
- copy_btn, but1, but2 = button_phold.columns(3)
52
 
53
- copy = copy_btn.button('Copier', key=f"f{i}")
54
  do_action = but1.button('Voir plus', key=f"v{i}")
55
  execute = but2.button('Executer', key=f"e{i}")
56
 
57
- if copy:
58
- pyperclip.copy(prompts[i]['text'])
59
  if execute:
60
  st.session_state.chat_history.append(HumanMessage(content=prompts[i]['text']))
61
  return 1
 
41
 
42
  with st.expander(name):
43
  for i, row in group.iterrows():
44
+ col1, col3, col4 = st.columns((0.4, 4, 2))
45
  col1.write(num) # index
46
  # col2.write(row['name']) # name
47
  col3.write(row['text']) # text
48
  num += 1
49
 
50
  button_phold = col4.empty() # create a placeholder
51
+ but1, but2 = button_phold.columns(2)
52
 
 
53
  do_action = but1.button('Voir plus', key=f"v{i}")
54
  execute = but2.button('Executer', key=f"e{i}")
55
 
 
 
56
  if execute:
57
  st.session_state.chat_history.append(HumanMessage(content=prompts[i]['text']))
58
  return 1