Refat81 commited on
Commit
c544e67
Β·
verified Β·
1 Parent(s): 5073f15

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -65
app.py CHANGED
@@ -1,8 +1,6 @@
1
- # main_dashboard.py
2
  import streamlit as st
3
  import os
4
- import requests
5
- from datetime import datetime
6
 
7
  def main():
8
  st.set_page_config(
@@ -22,31 +20,9 @@ def main():
22
  .facebook-pro-card { border-left-color: #FF6B35; }
23
  .feature-list { margin: 1rem 0; padding-left: 1.5rem; flex-grow: 1; }
24
  .api-key-section { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); padding: 1.5rem; border-radius: 10px; margin-bottom: 2rem; }
25
- .status-box { background-color: #1a1a2e; padding: 1rem; border-radius: 5px; margin: 0.5rem 0; min-height: 120px; }
26
  </style>
27
  """, unsafe_allow_html=True)
28
 
29
- # API Key Section
30
- st.markdown("""
31
- <div class="api-key-section">
32
- <h2 style="margin:0; color:white;">πŸ”‘ HuggingFace API Key Required</h2>
33
- <p style="margin:0; color:white; opacity:0.9;">Get FREE API key from: <a href="https://huggingface.co/settings/tokens" target="_blank" style="color:white; text-decoration:underline;">huggingface.co/settings/tokens</a></p>
34
- </div>
35
- """, unsafe_allow_html=True)
36
-
37
- # API Configuration
38
- hf_api_key = st.text_input(
39
- "πŸ€— Enter Your HuggingFace API Key",
40
- type="password",
41
- placeholder="hf_xxxxxxxxxxxxxxxx",
42
- help="Get FREE API key from huggingface.co/settings/tokens"
43
- )
44
-
45
- # Store API key
46
- if hf_api_key:
47
- st.session_state.hf_api_key = hf_api_key
48
- st.success("βœ… HuggingFace API Key saved! You can now launch extractors.")
49
-
50
  # Header
51
  st.markdown("""
52
  <div class="main-header">
@@ -54,7 +30,7 @@ def main():
54
  <p style="margin:0; opacity: 0.9;">100% Free - No Local Setup Required</p>
55
  </div>
56
  """, unsafe_allow_html=True)
57
-
58
  # Platform selection
59
  st.markdown("## πŸš€ Launch Extractors")
60
 
@@ -111,49 +87,15 @@ def main():
111
  if st.button("πŸš€ Launch Facebook Extractor 2.0", key="facebook_pro_btn", use_container_width=True):
112
  st.switch_page("pages/facebook_extractor_pro.py")
113
 
114
- # Status
115
- st.markdown("---")
116
- st.subheader("πŸ”„ Current Status")
117
-
118
- status_col1, status_col2, status_col3 = st.columns(3)
119
-
120
- with status_col1:
121
- st.markdown("### πŸ’Ό LinkedIn")
122
- st.success("βœ… Ready to launch")
123
-
124
- with status_col2:
125
- st.markdown("### πŸ“˜ Facebook")
126
- st.info("⚠️ Limited functionality in cloud")
127
-
128
- with status_col3:
129
- st.markdown("### πŸ”₯ Facebook 2.0")
130
- st.info("⚠️ Limited functionality in cloud")
131
-
132
  # Instructions
133
  with st.expander("πŸ“‹ How to Use", expanded=True):
134
  st.markdown("""
135
- 1. **Get FREE API Key:**
136
- - Go to https://huggingface.co/settings/tokens
137
- - Create account (FREE)
138
- - Click "New token"
139
- - Copy your token (starts with hf_)
140
-
141
- 2. **Enter API Key above**
142
-
143
- 3. **Click any extractor to launch**
144
-
145
- 4. **For LinkedIn:** Works immediately with any LinkedIn URL
146
-
147
- 5. **For Facebook:** Limited functionality in cloud deployment
148
-
149
- 6. **For full Facebook features:** Run locally with Selenium
150
 
151
- **Current Features:**
152
- - βœ… LinkedIn data extraction (profiles, companies, posts)
153
- - βœ… AI-powered analysis with HuggingFace
154
- - βœ… Conversation memory
155
- - βœ… Vector-based search
156
- - ⚠️ Facebook (limited to public data in cloud)
157
  """)
158
 
159
  if __name__ == "__main__":
 
1
+ # app.py
2
  import streamlit as st
3
  import os
 
 
4
 
5
  def main():
6
  st.set_page_config(
 
20
  .facebook-pro-card { border-left-color: #FF6B35; }
21
  .feature-list { margin: 1rem 0; padding-left: 1.5rem; flex-grow: 1; }
22
  .api-key-section { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); padding: 1.5rem; border-radius: 10px; margin-bottom: 2rem; }
 
23
  </style>
24
  """, unsafe_allow_html=True)
25
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  # Header
27
  st.markdown("""
28
  <div class="main-header">
 
30
  <p style="margin:0; opacity: 0.9;">100% Free - No Local Setup Required</p>
31
  </div>
32
  """, unsafe_allow_html=True)
33
+
34
  # Platform selection
35
  st.markdown("## πŸš€ Launch Extractors")
36
 
 
87
  if st.button("πŸš€ Launch Facebook Extractor 2.0", key="facebook_pro_btn", use_container_width=True):
88
  st.switch_page("pages/facebook_extractor_pro.py")
89
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
  # Instructions
91
  with st.expander("πŸ“‹ How to Use", expanded=True):
92
  st.markdown("""
93
+ 1. **Click any extractor to launch**
94
+ 2. **For LinkedIn:** Enter any LinkedIn URL
95
+ 3. **For Facebook:** Public data extraction available
96
+ 4. **AI Analysis:** Chat with extracted data
 
 
 
 
 
 
 
 
 
 
 
97
 
98
+ **Note:** All extractors are 100% free and require no local setup.
 
 
 
 
 
99
  """)
100
 
101
  if __name__ == "__main__":