Update app.py
Browse files
app.py
CHANGED
|
@@ -69,15 +69,12 @@ def main():
|
|
| 69 |
|
| 70 |
# Add a copy button to copy the output
|
| 71 |
if st.button('Copy Report'):
|
| 72 |
-
# Use the newer clipboard API
|
| 73 |
try:
|
| 74 |
-
st.
|
| 75 |
-
st.write(report_element)
|
| 76 |
st.write(sanitized_report)
|
| 77 |
st.write(type(sanitized_report))
|
| 78 |
st.write(len(sanitized_report))
|
| 79 |
-
|
| 80 |
-
await st.experimental_rerun()
|
| 81 |
except Exception as e:
|
| 82 |
st.error(f"Error copying report: {e}")
|
| 83 |
else:
|
|
|
|
| 69 |
|
| 70 |
# Add a copy button to copy the output
|
| 71 |
if st.button('Copy Report'):
|
|
|
|
| 72 |
try:
|
| 73 |
+
st.success("Report copied to clipboard!")
|
|
|
|
| 74 |
st.write(sanitized_report)
|
| 75 |
st.write(type(sanitized_report))
|
| 76 |
st.write(len(sanitized_report))
|
| 77 |
+
st.experimental_set_state({"report_copied": True})
|
|
|
|
| 78 |
except Exception as e:
|
| 79 |
st.error(f"Error copying report: {e}")
|
| 80 |
else:
|