Spaces:
Sleeping
Sleeping
ANASDAVOODTK
commited on
Commit
•
75d2364
1
Parent(s):
514aba0
testing
Browse files
app.py
CHANGED
@@ -1,7 +1,9 @@
|
|
|
|
1 |
import streamlit as st
|
|
|
2 |
import pyperclip
|
3 |
|
4 |
-
st.title("Copy text button
|
5 |
|
6 |
user_input = st.text_input("Enter your text here:")
|
7 |
|
@@ -10,4 +12,5 @@ if st.button("Display Text"):
|
|
10 |
|
11 |
if st.button("Copy to Clipboard"):
|
12 |
pyperclip.copy(user_input)
|
|
|
13 |
st.write("Text copied to clipboard!")
|
|
|
1 |
+
!apt-get install -y xclip
|
2 |
import streamlit as st
|
3 |
+
import os
|
4 |
import pyperclip
|
5 |
|
6 |
+
st.title("Copy text button code1")
|
7 |
|
8 |
user_input = st.text_input("Enter your text here:")
|
9 |
|
|
|
12 |
|
13 |
if st.button("Copy to Clipboard"):
|
14 |
pyperclip.copy(user_input)
|
15 |
+
os.system("echo -n $'%s' | xsel -ib" % pyperclip.paste())
|
16 |
st.write("Text copied to clipboard!")
|