Spaces:
Running
Running
File size: 7,576 Bytes
f282c32 b79ca65 c6e677b b79ca65 c6e677b b79ca65 c6e677b b79ca65 c6e677b b79ca65 c6e677b f282c32 |
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 |
---
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.
π¨ 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.
π¦ 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
Copy code
smartmarks/
β
βββ app.py
βββ requirements.txt
βββ README.md
βββ LICENSE
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:
plaintext
Copy code
gradio
beautifulsoup4
sentence-transformers
faiss-cpu
aiohttp
openai
Deploying the Space
Create a New Space:
Navigate to Hugging Face Spaces and click on "Create new Space".
Choose the Gradio SDK and set the visibility (public or private) as desired.
Upload Your Code:
Clone your Space repository or use the web interface to upload app.py, requirements.txt, README.md, and LICENSE.
Launch the Space:
Once all files are uploaded, Hugging Face Spaces will automatically build and deploy your application.
Access your Space via the provided URL.
π 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.
This dynamic theming ensures optimal readability and aesthetics without any manual intervention.
How It Works
The application uses CSS media queries to detect the user's preferred color scheme and applies appropriate styles:
css
Copy code
/* Dynamic Theme Styling */
@media (prefers-color-scheme: dark) {
body {
color: white;
background-color: #121212;
}
.card {
background-color: #1e1e1e;
}
a {
color: #bb86fc;
}
h1, h2, h3, p, strong {
color: inherit;
}
}
@media (prefers-color-scheme: light) {
body {
color: black;
background-color: white;
}
.card {
background-color: #fff;
}
a {
color: #1a0dab;
}
h1, h2, h3, p, strong {
color: inherit;
}
}
These styles ensure that the text and background colors adapt based on the user's system or browser theme settings.
πΈ Screenshots
Note: Replace the placeholders below with actual screenshots of your application in both light and dark modes.
Light Mode
Dark Mode
π 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 below.
π¬ 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 GenerativeAI?"
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
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 Bookmarks" 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 of Selected Bookmarks" button to update their categories.
Export Bookmarks:
Click the "πΎ Export Bookmarks" 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.
π§ 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.
π€ 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. See the LICENSE file for details.
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|