--- title: Trending Repos Analysis emoji: 🐢 colorFrom: indigo colorTo: red sdk: gradio sdk_version: 5.30.0 app_file: app.py pinned: false license: apache-2.0 short_description: Meta analysis about trends on trending repos --- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference # SQL Dataset Visualizer on Hugging Face Spaces This application allows you to query Hugging Face datasets using SQL and visualize the results using Plotly. ## Setup 1. Install dependencies: ```bash pip install -r requirements.txt ``` 2. Set up authentication: - Get your Hugging Face token from https://huggingface.co/settings/tokens - For local development, set the environment variable: ```bash export HF_TOKEN=your_token_here ``` - For Hugging Face Spaces, add the token in the Space settings: - Go to your Space settings - Add a new secret with key `HF_TOKEN` and your token as the value ## Run Locally ```bash python app.py ``` ## Deploy to Hugging Face Spaces 1. Push these files to a new Python Space on HF 2. Add your HF_TOKEN in the Space settings 3. The Space will automatically deploy with the token securely stored ## Usage 1. Enter your SQL query in the text box 2. The results will be automatically visualized as a bar chart 3. If there's an error in your query, it will be displayed as text ## Security Note - Never commit your HF_TOKEN to version control - Always use environment variables or Space secrets for authentication - The token is used to access private datasets and authenticate API requests