Inoob commited on
Commit
862f422
·
verified ·
1 Parent(s): 76b5dc0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -80,10 +80,11 @@ rouges=[]
80
  if st.session_state.current_index < len(samples):
81
  # Display the current element
82
  current_element = samples[st.session_state.current_index]["text"].split(" ")
83
- st.write(f"**Element {st.session_state.current_index + 1}:** {current_element}")
84
  current_element=" ".join(current_element).strip().replace("\n","")
85
  prompt = "You are a helpful assistant that echoes the user's input, but backwards, do not simply rearrange the words, reverse the user's input down to the character (e.g. reverse Hello World to dlroW olleH). Surround the backwards version of the user's input with <back> </back> tags. "+current_element
86
  clipboard.copy(prompt)
 
87
  true_output = current_element[::-1]
88
  print("True output:", true_output)
89
  # Input widget to get user input, tied to session state
 
80
  if st.session_state.current_index < len(samples):
81
  # Display the current element
82
  current_element = samples[st.session_state.current_index]["text"].split(" ")
83
+
84
  current_element=" ".join(current_element).strip().replace("\n","")
85
  prompt = "You are a helpful assistant that echoes the user's input, but backwards, do not simply rearrange the words, reverse the user's input down to the character (e.g. reverse Hello World to dlroW olleH). Surround the backwards version of the user's input with <back> </back> tags. "+current_element
86
  clipboard.copy(prompt)
87
+ st.code(f"**Element {st.session_state.current_index + 1}:** {current_element}")
88
  true_output = current_element[::-1]
89
  print("True output:", true_output)
90
  # Input widget to get user input, tied to session state