siddhartharya commited on
Commit
b79ca65
Β·
verified Β·
1 Parent(s): 3bc8a35

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +204 -72
README.md CHANGED
@@ -9,81 +9,213 @@ app_file: app.py
9
  pinned: false
10
  ---
11
 
12
- # Bookmark Manager App
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
 
14
- Welcome to the Bookmark Manager App! This application allows you to upload your browser bookmarks, process them to extract useful information, and interact with them using a chatbot interface.
 
 
 
15
 
16
- ## **Features**
 
 
 
17
 
18
- - **Upload Bookmarks**: Import an HTML file containing your browser bookmarks.
19
- - **Data Extraction**: Extracts URL, website name, meta tags, and ETags from each bookmark.
20
- - **Content Summarization**: Generates a brief summary of each bookmark's content using a free language model.
21
- - **Vectorization and Storage**: Vectorizes the data and stores it in a FAISS vector database for efficient retrieval.
22
- - **Chatbot Interaction**: Chat with your bookmarks to retrieve information based on your queries.
23
- - **Bookmark Management**: Edit or delete bookmarks directly within the app.
24
- - **Dead Link Detection**: Identifies and marks broken or dead links prominently.
25
- - **User-Friendly Interface**: Improved interface with pleasant styling and clickable links.
26
 
27
- ## **How to Use**
28
-
29
- 1. **Upload and Process Bookmarks**
30
-
31
- - Navigate to the **"Upload and Process Bookmarks"** tab.
32
- - Click on **"Upload Bookmarks HTML File"** and select your bookmarks HTML file.
33
- - Click **"Process Bookmarks"** to start processing.
34
- - After processing, your bookmarks will be displayed with relevant data, and dead links will be highlighted.
35
-
36
- 2. **Chat with Your Bookmarks**
37
-
38
- - Go to the **"Chat with Bookmarks"** tab.
39
- - Enter a query in natural language to search your bookmarks.
40
- - Click **"Send"** to get responses related to your query.
41
-
42
- 3. **Manage Your Bookmarks**
43
-
44
- - Access the **"Manage Bookmarks"** tab.
45
- - Click **"Refresh Bookmark List"** to view all bookmarks.
46
- - To edit a bookmark:
47
- - Enter the bookmark's index number.
48
- - Provide a new title and/or URL.
49
- - Click **"Edit Bookmark"**.
50
- - To delete a bookmark:
51
- - Enter the bookmark's index number.
52
- - Click **"Delete Bookmark"**.
53
-
54
- ## **Requirements**
55
-
56
- - **Python Libraries**: The app uses the following Python libraries:
57
- - `gradio`
58
- - `beautifulsoup4`
59
- - `requests`
60
- - `transformers`
61
- - `sentence-transformers`
62
- - `faiss-cpu`
63
- - `pandas`
64
-
65
- ## **Models Used**
66
-
67
- - **Summarization Model**: `sshleifer/distilbart-cnn-6-6` from Hugging Face Transformers.
68
- - **Embedding Model**: `all-MiniLM-L6-v2` from SentenceTransformers.
69
-
70
- ## **Limitations**
71
-
72
- - **Performance**: Processing a large number of bookmarks may be slow due to resource limitations.
73
- - **Data Persistence**: The app does not save data between sessions. All data is lost when the app restarts.
74
- - **Error Handling**: Basic error handling is implemented, but unexpected inputs may cause issues.
75
-
76
- ## **Acknowledgments**
77
-
78
- - **Hugging Face**: For providing the models and platform to deploy the app.
79
- - **Open-Source Libraries**: Thanks to the contributors of the libraries used in this project.
80
-
81
- ## **License**
82
-
83
- This project is open-source and available under the MIT License.
84
-
85
- ---
86
-
87
- Enjoy using the Bookmark Manager App!
88
 
89
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
9
  pinned: false
10
  ---
11
 
12
+ πŸ“š SmartMarks - AI Browser Bookmarks Manager
13
+
14
+ 🌟 Overview
15
+ SmartMarks is your intelligent assistant for managing browser bookmarks. Leveraging the power of AI, SmartMarks helps you organize, search, and interact with your bookmarks seamlessly. Whether you're looking to categorize your links, retrieve information quickly, or maintain an updated list, SmartMarks has you covered.
16
+
17
+ Key Features
18
+ πŸ“‚ Upload and Process Bookmarks: Import your existing bookmarks and let SmartMarks analyze and categorize them for you.
19
+ πŸ’¬ Chat with Bookmarks: Interact with your bookmarks using natural language queries to find relevant links effortlessly.
20
+ πŸ› οΈ Manage Bookmarks: View, edit, delete, and export your bookmarks with ease.
21
+ 🎨 Dynamic Color Theme: Automatically adapts to your system or browser's light/dark mode preferences for optimal readability and aesthetics.
22
+ πŸš€ How to Use SmartMarks
23
+ SmartMarks is divided into three main sections:
24
+
25
+ πŸ“‚ Upload and Process Bookmarks: Import and process your bookmarks.
26
+ πŸ’¬ Chat with Bookmarks: Ask questions about your bookmarks using natural language.
27
+ πŸ› οΈ Manage Bookmarks: Manage your bookmarks by viewing, editing, deleting, and exporting them.
28
+ Navigate through the tabs to explore each feature in detail.
29
+
30
+ πŸ“¦ Deployment on Hugging Face Spaces
31
+ SmartMarks is designed to run seamlessly on Hugging Face Spaces, providing an interactive and user-friendly interface.
32
+
33
+ Prerequisites
34
+ Hugging Face Account: To deploy on Hugging Face Spaces, you need an account. Sign up here.
35
+ API Key: SmartMarks utilizes the Groq Cloud API for its chatbot functionality. Ensure you have a valid GROQ_API_KEY.
36
+ Repository Structure
37
+ Copy code
38
+ smartmarks/
39
+ β”‚
40
+ β”œβ”€β”€ app.py
41
+ β”œβ”€β”€ requirements.txt
42
+ β”œβ”€β”€ README.md
43
+ └── LICENSE
44
+ Setting Up Environment Variables
45
+ GROQ_API_KEY:
46
+ SmartMarks requires the GROQ_API_KEY to interact with the Groq Cloud API. To set this up:
47
+
48
+ Navigate to your Space's dashboard on Hugging Face.
49
+
50
+ Go to Settings > Secrets.
51
+
52
+ Add a new secret with the key GROQ_API_KEY and paste your API key as the value.
53
+
54
+ Note: Keep your API keys secure. Never expose them in your code or repository.
55
+
56
+ Installing Dependencies
57
+ Hugging Face Spaces automatically installs dependencies listed in the requirements.txt file. Ensure your requirements.txt includes all necessary packages:
58
+
59
+ plaintext
60
+ Copy code
61
+ gradio
62
+ beautifulsoup4
63
+ sentence-transformers
64
+ faiss-cpu
65
+ aiohttp
66
+ openai
67
+
68
+ Deploying the Space
69
+ Create a New Space:
70
+
71
+ Navigate to Hugging Face Spaces and click on "Create new Space".
72
+ Choose the Gradio SDK and set the visibility (public or private) as desired.
73
+ Upload Your Code:
74
+
75
+ Clone your Space repository or use the web interface to upload app.py, requirements.txt, README.md, and LICENSE.
76
+ Launch the Space:
77
+
78
+ Once all files are uploaded, Hugging Face Spaces will automatically build and deploy your application.
79
+ Access your Space via the provided URL.
80
+ 🌈 Dynamic Color Theme
81
+ SmartMarks automatically detects your system or browser's preferred color scheme and adjusts the application's theme accordingly:
82
+
83
+ Dark Mode: White text on a dark background for reduced eye strain in low-light environments.
84
+ Light Mode: Black text on a light background for bright environments.
85
+ This dynamic theming ensures optimal readability and aesthetics without any manual intervention.
86
+
87
+ How It Works
88
+ The application uses CSS media queries to detect the user's preferred color scheme and applies appropriate styles:
89
+
90
+ css
91
+ Copy code
92
+ /* Dynamic Theme Styling */
93
+ @media (prefers-color-scheme: dark) {
94
+ body {
95
+ color: white;
96
+ background-color: #121212;
97
+ }
98
+ .card {
99
+ background-color: #1e1e1e;
100
+ }
101
+ a {
102
+ color: #bb86fc;
103
+ }
104
+ h1, h2, h3, p, strong {
105
+ color: inherit;
106
+ }
107
+ }
108
+
109
+ @media (prefers-color-scheme: light) {
110
+ body {
111
+ color: black;
112
+ background-color: white;
113
+ }
114
+ .card {
115
+ background-color: #fff;
116
+ }
117
+ a {
118
+ color: #1a0dab;
119
+ }
120
+ h1, h2, h3, p, strong {
121
+ color: inherit;
122
+ }
123
+ }
124
+ These styles ensure that the text and background colors adapt based on the user's system or browser theme settings.
125
+
126
+ πŸ“Έ Screenshots
127
+ Note: Replace the placeholders below with actual screenshots of your application in both light and dark modes.
128
+
129
+ Light Mode
130
+
131
+ Dark Mode
132
+
133
+ πŸ“‹ Features in Detail
134
+ πŸ“‚ Upload and Process Bookmarks
135
+ Upload Bookmarks File:
136
+
137
+ Click on the "πŸ“ Upload Bookmarks HTML File" button.
138
+ Select your browser's exported bookmarks HTML file from your device.
139
+ Process Bookmarks:
140
+
141
+ After uploading, click on the "βš™οΈ Process Bookmarks" button.
142
+ SmartMarks will parse your bookmarks, fetch additional information, generate summaries, and categorize each link based on predefined categories.
143
+ View Processed Bookmarks:
144
+
145
+ Once processing is complete, your bookmarks will be displayed in an organized and visually appealing format below.
146
+ πŸ’¬ Chat with Bookmarks
147
+ Enter Your Query:
148
+
149
+ In the "✍️ Ask about your bookmarks" textbox, type your question or keyword related to your bookmarks. For example, "Do I have any bookmarks about GenerativeAI?"
150
+ Submit Your Query:
151
+
152
+ Click the "πŸ“¨ Send" button to submit your query.
153
+ Receive AI-Driven Responses:
154
+
155
+ SmartMarks will analyze your query and provide relevant bookmarks that match your request, making it easier to find specific links without manual searching.
156
+ View Chat History:
157
+
158
+ All your queries and the corresponding AI responses are displayed in the chat history for your reference.
159
+ πŸ› οΈ Manage Bookmarks
160
+ View Bookmarks:
161
+
162
+ All your processed bookmarks are displayed here with their respective categories and summaries.
163
+ Select Bookmarks:
164
+
165
+ Use the checkboxes next to each bookmark to select one, multiple, or all bookmarks you wish to manage.
166
+ Delete Selected Bookmarks:
167
+
168
+ After selecting the desired bookmarks, click the "πŸ—‘οΈ Delete Selected Bookmarks" button to remove them from your list.
169
+ Edit Categories:
170
+
171
+ Select the bookmarks you want to re-categorize.
172
+ Choose a new category from the dropdown menu labeled "πŸ†• New Category".
173
+ Click the "✏️ Edit Category of Selected Bookmarks" button to update their categories.
174
+ Export Bookmarks:
175
+
176
+ Click the "πŸ’Ύ Export Bookmarks" button to download your updated bookmarks as an HTML file.
177
+ This file can be uploaded back to your browser to reflect the changes made within SmartMarks.
178
+ Refresh Bookmarks:
179
+
180
+ Click the "πŸ”„ Refresh Bookmarks" button to ensure the latest state is reflected in the display.
181
+ πŸ”§ Configuration
182
+ Ensure that the GROQ_API_KEY environment variable is set correctly, as it's essential for the chatbot functionality to interact with the Groq Cloud API.
183
+
184
+ 🀝 Contributing
185
+ Contributions are welcome! Please follow these steps to contribute:
186
+
187
+ Fork the Repository:
188
+
189
+ Click on the "Fork" button at the top right of the repository page.
190
+ Clone Your Fork:
191
+
192
+ bash
193
+ Copy code
194
+ git clone https://github.com/your-username/smartmarks.git
195
+ cd smartmarks
196
+ Create a New Branch:
197
+
198
+ bash
199
+ Copy code
200
+ git checkout -b feature/YourFeature
201
+ Make Your Changes:
202
+
203
+ Implement your feature or bug fix.
204
+ Commit Your Changes:
205
 
206
+ bash
207
+ Copy code
208
+ git commit -m "Add some feature"
209
+ Push to Your Fork:
210
 
211
+ bash
212
+ Copy code
213
+ git push origin feature/YourFeature
214
+ Open a Pull Request:
215
 
216
+ Navigate to your forked repository on GitHub and click on "Compare & pull request".
 
 
 
 
 
 
 
217
 
218
+ πŸ“œ License
219
+ This project is licensed under the MIT License. See the LICENSE file for details.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
220
 
221
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference