File size: 8,750 Bytes
f282c32
 
 
 
 
 
 
 
 
 
9cc4f0d
817113d
 
9cc4f0d
 
817113d
9cc4f0d
 
 
 
 
 
 
817113d
 
9cc4f0d
 
 
817113d
 
9cc4f0d
 
 
817113d
9cc4f0d
 
 
817113d
9cc4f0d
 
 
817113d
9cc4f0d
 
 
 
817113d
9cc4f0d
 
817113d
9cc4f0d
 
817113d
9cc4f0d
 
817113d
9cc4f0d
 
 
 
817113d
9cc4f0d
 
817113d
9cc4f0d
 
817113d
9cc4f0d
 
817113d
9cc4f0d
 
 
 
817113d
9cc4f0d
 
 
817113d
9cc4f0d
 
 
817113d
9cc4f0d
 
 
 
817113d
 
9cc4f0d
 
 
 
 
20e84c1
9cc4f0d
 
c6e677b
9cc4f0d
c6e677b
9cc4f0d
c6e677b
9cc4f0d
c6e677b
9cc4f0d
c6e677b
9cc4f0d
 
817113d
9cc4f0d
817113d
 
 
 
 
9cc4f0d
 
 
 
817113d
 
 
 
 
 
9cc4f0d
817113d
9cc4f0d
 
817113d
9cc4f0d
 
817113d
9cc4f0d
 
817113d
9cc4f0d
817113d
9cc4f0d
817113d
9cc4f0d
817113d
 
 
 
 
 
 
 
 
 
 
 
 
9cc4f0d
817113d
 
 
9cc4f0d
817113d
 
 
 
 
9cc4f0d
817113d
 
 
 
 
 
 
 
 
 
 
 
9cc4f0d
817113d
 
 
 
9cc4f0d
817113d
 
9cc4f0d
817113d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9cc4f0d
817113d
 
9cc4f0d
817113d
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
---
title: Bookmark Manager
emoji: 😻
colorFrom: yellow
colorTo: pink
sdk: gradio
sdk_version: 5.5.0
app_file: app.py
pinned: false
---
πŸ“š SmartMarks - AI Browser Bookmarks Manager


🌟 Overview
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.

Key Features
πŸ“‚ Upload and Process Bookmarks: Import your existing bookmarks and let SmartMarks analyze and categorize them for you.
πŸ’¬ Chat with Bookmarks: Interact with your bookmarks using natural language queries to find relevant links effortlessly.
πŸ› οΈ Manage Bookmarks: View, edit, delete, and export your bookmarks with ease.
πŸš€ High Processing Speed: Enhanced performance through concurrent fetching and processing of bookmarks.
🎨 Dynamic Color Theme: Automatically adapts to your system or browser's light/dark mode preferences for optimal readability and aesthetics.
πŸš€ How to Use SmartMarks
SmartMarks is divided into three main sections:

πŸ“‚ Upload and Process Bookmarks: Import and process your bookmarks.
πŸ’¬ Chat with Bookmarks: Ask questions about your bookmarks using natural language.
πŸ› οΈ Manage Bookmarks: Manage your bookmarks by viewing, editing, deleting, and exporting them.
Navigate through the tabs to explore each feature in detail.

πŸ“‚ Upload and Process Bookmarks
πŸ“ Steps:
Upload Bookmarks File:

Click on the "πŸ“ Upload Bookmarks HTML File" button.
Select your browser's exported bookmarks HTML file from your device.
Process Bookmarks:

After uploading, click on the "βš™οΈ Process Bookmarks" button.
SmartMarks will parse your bookmarks, fetch additional information, generate summaries, and categorize each link based on predefined categories.
View Processed Bookmarks:

Once processing is complete, your bookmarks will be displayed in an organized and visually appealing format.
πŸ’¬ Chat with Bookmarks
πŸ€– How to Interact:
Enter Your Query:

In the "✍️ Ask about your bookmarks" textbox, type your question or keyword related to your bookmarks. For example, "Do I have any bookmarks about AI?"
Submit Your Query:

Click the "πŸ“¨ Send" button to submit your query.
Receive AI-Driven Responses:

SmartMarks will analyze your query and provide relevant bookmarks that match your request, making it easier to find specific links without manual searching.
View Chat History:

All your queries and the corresponding AI responses are displayed in the chat history for your reference.
πŸ› οΈ Manage Bookmarks
πŸ—‚οΈ Features:
View Bookmarks:

All your processed bookmarks are displayed here with their respective categories and summaries.
Select Bookmarks:

Use the checkboxes next to each bookmark to select one, multiple, or all bookmarks you wish to manage.
Delete Selected Bookmarks:

After selecting the desired bookmarks, click the "πŸ—‘οΈ Delete Selected" button to remove them from your list.
Edit Categories:

Select the bookmarks you want to re-categorize.
Choose a new category from the dropdown menu labeled "πŸ†• New Category".
Click the "✏️ Edit Category" button to update their categories.
Export Bookmarks:

Click the "πŸ’Ύ Export" button to download your updated bookmarks as an HTML file.
This file can be uploaded back to your browser to reflect the changes made within SmartMarks.
Refresh Bookmarks:

Click the "πŸ”„ Refresh Bookmarks" button to ensure the latest state is reflected in the display.
πŸ“¦ Deployment on Hugging Face Spaces
SmartMarks is designed to run seamlessly on Hugging Face Spaces, providing an interactive and user-friendly interface.

Prerequisites
Hugging Face Account: To deploy on Hugging Face Spaces, you need an account. Sign up here.
API Key: SmartMarks utilizes the Groq Cloud API for its chatbot functionality. Ensure you have a valid GROQ_API_KEY.
Repository Structure
markdown
Copy code
smartmarks/
β”œβ”€β”€ app.py
β”œβ”€β”€ app.css
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ README.md

Setting Up Environment Variables
GROQ_API_KEY: SmartMarks requires the GROQ_API_KEY to interact with the Groq Cloud API. To set this up:

Navigate to your Space's dashboard on Hugging Face.

Go to Settings > Secrets.

Add a new secret with the key GROQ_API_KEY and paste your API key as the value.

Note: Keep your API keys secure. Never expose them in your code or repository.

Installing Dependencies
Hugging Face Spaces automatically installs dependencies listed in the requirements.txt file. Ensure your requirements.txt includes all necessary packages:

shell
Copy code
gradio
beautifulsoup4
sentence-transformers
faiss-cpu
requests
numpy
openai>=0.27.0,<1.0.0
Note: The uuid library is part of Python's standard library and doesn't require installation via pip. You can remove it from requirements.txt if it was previously included.

🌈 Dynamic Color Theme
SmartMarks automatically detects your system or browser's preferred color scheme and adjusts the application's theme accordingly:

Dark Mode: White text on a dark background for reduced eye strain in low-light environments.
Light Mode: Black text on a light background for bright environments.
These styles ensure that the text and background colors adapt based on the user's system or browser theme settings.

πŸ”§ Configuration
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.

Setting Up Environment Variables
Navigate to Space Settings:

Go to your Space's dashboard on Hugging Face.
Add Secret:

Click on Settings > Secrets.

Add a new secret with the key GROQ_API_KEY and paste your API key as the value.

Note: Keep your API keys secure. Never expose them in your code or repository.

πŸ“‹ Features in Detail
πŸ“‚ Upload and Process Bookmarks
Upload Bookmarks File:

Click on the "πŸ“ Upload Bookmarks HTML File" button.
Select your browser's exported bookmarks HTML file from your device.
Process Bookmarks:

After uploading, click on the "βš™οΈ Process Bookmarks" button.
SmartMarks will parse your bookmarks, fetch additional information, generate summaries, and categorize each link based on predefined categories.
View Processed Bookmarks:

Once processing is complete, your bookmarks will be displayed in an organized and visually appealing format.
πŸ’¬ Chat with Bookmarks
Enter Your Query:

In the "✍️ Ask about your bookmarks" textbox, type your question or keyword related to your bookmarks. For example, "Do I have any bookmarks about AI?"
Submit Your Query:

Click the "πŸ“¨ Send" button to submit your query.
Receive AI-Driven Responses:

SmartMarks will analyze your query and provide relevant bookmarks that match your request.
View Chat History:

All your queries and the corresponding AI responses are displayed in the chat history for your reference.
πŸ› οΈ Manage Bookmarks
View Bookmarks:

All your processed bookmarks are displayed here with their respective categories and summaries.
Select Bookmarks:

Use the checkboxes next to each bookmark to select one, multiple, or all bookmarks you wish to manage.
Delete Selected Bookmarks:

After selecting the desired bookmarks, click the "πŸ—‘οΈ Delete Selected" button to remove them from your list.
Edit Categories:

Select the bookmarks you want to re-categorize.
Choose a new category from the dropdown menu labeled "πŸ†• New Category".
Click the "✏️ Edit Category" button to update their categories.
Export Bookmarks:

Click the "πŸ’Ύ Export" button to download your updated bookmarks as an HTML file.
This file can be uploaded back to your browser to reflect the changes made within SmartMarks.
Refresh Bookmarks:

Click the "πŸ”„ Refresh Bookmarks" button to ensure the latest state is reflected in the display.
🀝 Contributing
Contributions are welcome! Please follow these steps to contribute:

Fork the Repository:

Click on the "Fork" button at the top right of the repository page.
Clone Your Fork:

bash
Copy code
git clone https://github.com/your-username/smartmarks.git
cd smartmarks
Create a New Branch:

bash
Copy code
git checkout -b feature/YourFeature
Make Your Changes:

Implement your feature or bug fix.
Commit Your Changes:

bash
Copy code
git commit -m "Add some feature"
Push to Your Fork:

bash
Copy code
git push origin feature/YourFeature
Open a Pull Request:

Navigate to your forked repository on GitHub and click on "Compare & pull request".
πŸ“œ License
This project is licensed under the MIT License.

πŸ“ž Contact
For any questions or feedback, please contact [email protected]

Happy Bookmarking with SmartMarks! πŸš€πŸ“š