CoolFace
Apppublic

ndwdgda/replit2

sourceHugging Faceupdated 9mo agoView on Hugging Face
0likes
App README

HHeuristics Proprietary Datasets App

A FastAPI application that generates, updates, and sells proprietary market research datasets in CSV format. The primary dataset tracks "AI & Tech News Sentiment" using the Finnhub API.

Features

  • Data Alchemy Dashboard: A professional showcase demonstrating the "Input → Processing → Output → Profit" pipeline for each data product.
  • Real-Time Data: Visualizations powered by the actual CSV data generated by the Premium Data Engine.
  • Secure Access: Protected by HTTP Basic Auth.
  • Automated Updates: Daily data collection for major AI/Tech companies (NVDA, MSFT, GOOGL, META, AAPL, TSLA, AMD).

Local Development

  1. 1.Clone the repository:
bash
   git clone https://github.com/Nhughes09/replit.git
   cd replit
  1. 1.Install dependencies:
bash
   pip install -r requirements.txt
  1. 1.Set Environment Variables: You need a Finnhub API key.
bash
   export FINNHUB_KEY="your_finnhub_key"
  1. 1.Run the App:
bash
   uvicorn main:app --reload

Visit http://localhost:8000.

  1. 1.Run Data Update Manually:
bash
   python update_data.py

Deployment on Hugging Face Spaces

This app is optimized for Hugging Face Spaces (Docker SDK).

1. Create a Space

  1. 1.Go to huggingface.co/new-space.
  2. 2.Name: hheuristics-datasets (or similar).
  3. 3.SDK: Select Docker.
  4. 4.Template: Select Blank.
  5. 5.Space Hardware: Free (CPU basic) is sufficient.

2. Connect Repository

You can either:

  • Sync with GitHub: In the Space settings, connect this GitHub repository.
  • Direct Push: Add the Space as a remote and push directly:
bash
    git remote add space https://huggingface.co/spaces/YOUR_USERNAME/SPACE_NAME
    git push space main

3. Environment Variables

  1. 1.Go to your Space's Settings tab.
  2. 2.Scroll to Variables and secrets.
  3. 3.Add a Secret:
  4. 4.Key: FINNHUB_KEY
  5. 5.Value: Your Finnhub API Key.

4. Background Updates

The GitHub Action (.github/workflows/daily_update.yml) will still handle the daily data updates for free! It pushes the new data to GitHub, which will trigger a rebuild of your Space if you have connected them.