Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -167,14 +167,9 @@ if st.session_state.output_text:
|
|
| 167 |
unsafe_allow_html=True
|
| 168 |
)
|
| 169 |
|
| 170 |
-
# Copy button with
|
| 171 |
col_copy, col_empty = st.columns([1, 3])
|
| 172 |
with col_copy:
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
<script>
|
| 177 |
-
navigator.clipboard.writeText(`{st.session_state.output_text}`);
|
| 178 |
-
</script>
|
| 179 |
-
""", unsafe_allow_html=True)
|
| 180 |
-
st.toast("✓ Copied to clipboard!", icon="✅")
|
|
|
|
| 167 |
unsafe_allow_html=True
|
| 168 |
)
|
| 169 |
|
| 170 |
+
# Copy button with pyperclip alternative
|
| 171 |
col_copy, col_empty = st.columns([1, 3])
|
| 172 |
with col_copy:
|
| 173 |
+
# Display the output in a code block that users can easily select and copy
|
| 174 |
+
st.code(st.session_state.output_text, language=None)
|
| 175 |
+
st.caption("👆 Select and copy the text above (Ctrl+C / Cmd+C)")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|