Spaces:
Build error
Build error
Update app.py
Browse files79 unmodified lines8081828384858687888979 unmodified linesif st.session_state.current_index < len(samples):# Display the current elementcurrent_element = samples[st.session_state.current_index]["text"].split(" ")st.write(f"**Element {st.session_state.current_index + 1}:** {current_element}")current_element=" ".join(current_element).strip().replace("\n","")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_elementclipboard.copy(prompt)true_output = current_element[::-1]print("True output:", true_output)# Input widget to get user input, tied to session state79 unmodified lines808182838485868788899079 unmodified linesif st.session_state.current_index < len(samples):# Display the current elementcurrent_element = samples[st.session_state.current_index]["text"].split(" ")current_element=" ".join(current_element).strip().replace("\n","")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_elementclipboard.copy(prompt)st.code(f"**Element {st.session_state.current_index + 1}:** {current_element}")true_output = current_element[::-1]print("True output:", true_output)# Input widget to get user input, tied to session state
app.py+2-1