Jobanpreet commited on
Commit
f907807
·
verified ·
1 Parent(s): eb32a33

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -63
app.py CHANGED
@@ -115,65 +115,6 @@ def extract_data(post_data):
115
 
116
 
117
 
118
- # def main():
119
- # st.title("Paraphrase LinkedIn Post")
120
-
121
- # # Initialize SessionState dictionary
122
- # session_state = st.session_state
123
-
124
- # if 'paraphrase' not in session_state:
125
- # session_state.paraphrase = ""
126
- # if 'keywords' not in session_state:
127
- # session_state.keywords = ""
128
- # if 'take_aways' not in session_state:
129
- # session_state.take_aways = ""
130
- # if 'highlights' not in session_state:
131
- # session_state.highlights = ""
132
-
133
- # # User input for two numbers
134
- # url = st.sidebar.text_input("Enter URL:", placeholder="Enter URL here...")
135
-
136
- # # Button to calculate sum
137
- # if st.sidebar.button("Submit"):
138
- # if url:
139
- # original_url = get_original_url(url)
140
- # match = re.match(r"https?://(?:www\.)?linkedin\.com/(posts|feed|pulse)/.*", original_url) # checking domain and url page (means it should only be a post nothing else like login page or something else)
141
-
142
- # if match:
143
- # session_state.paraphrase, session_state.keywords, session_state.take_aways, session_state.highlights = paraphrased_post(url)
144
-
145
- # else:
146
- # st.sidebar.error("Put a valid LinkedIn post url only")
147
-
148
- # st.write(session_state.paraphrase)
149
-
150
- # if st.sidebar.button("Show Keywords") and session_state.keywords:
151
- # st.write("Keywords:")
152
- # for i, statement in enumerate(session_state.keywords, start=1):
153
- # st.write(f"{i}. {statement}")
154
-
155
-
156
- # if st.sidebar.button("Show Take Aways") and session_state.take_aways:
157
- # st.write("Take Aways:")
158
- # for i, statement in enumerate(session_state.take_aways, start=1):
159
- # st.write(f"{i}. {statement}")
160
-
161
- # if st.sidebar.button("Show Highlights") and session_state.highlights:
162
- # st.write("Highlights:")
163
- # for i, statement in enumerate(session_state.highlights, start=1):
164
- # st.write(f"{i}. {statement}")
165
-
166
- # if __name__ == "__main__":
167
- # main()
168
-
169
-
170
-
171
-
172
-
173
-
174
-
175
- import pyperclip
176
-
177
  def main():
178
  st.title("Paraphrase LinkedIn Post")
179
 
@@ -206,10 +147,6 @@ def main():
206
 
207
 
208
  st.text_area("Paraphrase:", value=session_state.paraphrase, height=400)
209
- if st.button("Copy Text"):
210
- # Copy the content of the textarea to the clipboard
211
- pyperclip.copy(session_state.paraphrase)
212
- st.success("Text copied to clipboard!")
213
 
214
  if st.sidebar.button("Show Keywords") and session_state.keywords:
215
  st.write("Keywords:")
 
115
 
116
 
117
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
118
  def main():
119
  st.title("Paraphrase LinkedIn Post")
120
 
 
147
 
148
 
149
  st.text_area("Paraphrase:", value=session_state.paraphrase, height=400)
 
 
 
 
150
 
151
  if st.sidebar.button("Show Keywords") and session_state.keywords:
152
  st.write("Keywords:")