Spaces:
Runtime error
Runtime error
|
Download README.md from chiluka/AIResearchAssistant: direct link, hf CLI and curl.
- Browser
- Download file 2.32 kB
-
https://huggingface.co/spaces/chiluka/AIResearchAssistant/resolve/main/README.md
- Command line
-
hf download hf://spaces/chiluka/AIResearchAssistant/README.md
-
curl -L -o README.md https://huggingface.co/spaces/chiluka/AIResearchAssistant/resolve/main/README.md
2.32 kB
metadata
title: AIResearchAssistant
emoji: π
colorFrom: purple
colorTo: gray
sdk: docker
pinned: false
license: mit
short_description: ResearchAssistant
AI Research Assistant β Unified Project
This repository contains both the frontend and backend parts of the AI Research Assistant project, structured for single-port Docker deployment (e.g. Hugging Face Spaces, Render, or self-hosted Docker).
Repository Structure
AI_Research_Assistant-frontend/β React SPA frontend (built with Vite + TypeScript)AI_Research_Assistant-backend/β FastAPI backend (handles text extraction, vector embeddings, Gemini Q&A, and reports)Dockerfileβ Multi-stage build that compiles the React frontend and serves it directly through the FastAPI backend on port 7860.
Local Development (Without Docker)
You can run both services independently on localhost:
1. Run the Backend
cd AI_Research_Assistant-backend
python -m venv venv
source venv/bin/activate # On Windows: .\venv\Scripts\Activate.ps1
pip install -r requirements.txt
python -m uvicorn app.main:app --host 0.0.0.0 --port 8000
Make sure to configure the .env file inside AI_Research_Assistant-backend/ with your GEMINI_API_KEY.
2. Run the Frontend
cd AI_Research_Assistant-frontend
npm install
npm run dev
Running with Docker Locally
To build and run the unified container locally:
Build the Docker image:
docker build -t ai-research-assistant .Run the container (pass your Gemini API key as an environment variable):
docker run -p 7860:7860 -e GEMINI_API_KEY="your-gemini-api-key" ai-research-assistantOpen your browser and navigate to:
- App:
http://localhost:7860/ - API Docs:
http://localhost:7860/docs
- App:
Deployment to Hugging Face Spaces
- Create a new Docker Space on Hugging Face.
- In the repository settings of the Space, add your
GEMINI_API_KEYunder the Repository Secrets. - Push the files in this repository (the
mainbranch) to the Space's Git remote. Hugging Face will automatically trigger the Docker build using the rootDockerfileand run the app on port 7860.
Check out the Hugging Face configuration reference at https://huggingface.co/docs/hub/spaces-config-reference