Upload 5 files
Browse files- Dockerfile +34 -0
- README.md +38 -0
- dockerignore +28 -0
- gitattributes +35 -0
- requirements.txt +168 -0
Dockerfile
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM python:3.10-slim
|
| 2 |
+
|
| 3 |
+
WORKDIR /app
|
| 4 |
+
|
| 5 |
+
# Install system dependencies for audio/image processing
|
| 6 |
+
RUN apt-get update && apt-get install -y \
|
| 7 |
+
gcc \
|
| 8 |
+
g++ \
|
| 9 |
+
libpq-dev \
|
| 10 |
+
libmagic1 \
|
| 11 |
+
ffmpeg \
|
| 12 |
+
libsm6 \
|
| 13 |
+
libxext6 \
|
| 14 |
+
libxrender-dev \
|
| 15 |
+
libgomp1 \
|
| 16 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 17 |
+
|
| 18 |
+
# Copy requirements first for better caching
|
| 19 |
+
COPY requirements.txt .
|
| 20 |
+
|
| 21 |
+
# Install Python packages
|
| 22 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 23 |
+
|
| 24 |
+
# Copy the rest of the application
|
| 25 |
+
COPY . .
|
| 26 |
+
|
| 27 |
+
# Create necessary directories
|
| 28 |
+
RUN mkdir -p generated_images generated_docs processed_docs temp_docs
|
| 29 |
+
|
| 30 |
+
# Expose the port
|
| 31 |
+
EXPOSE 7860
|
| 32 |
+
|
| 33 |
+
# Run the application
|
| 34 |
+
CMD ["python", "app.py"]
|
README.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: HenAi AI Assistant
|
| 3 |
+
emoji: 🐔
|
| 4 |
+
colorFrom: purple
|
| 5 |
+
colorTo: indigo
|
| 6 |
+
sdk: docker
|
| 7 |
+
app_port: 7860
|
| 8 |
+
pinned: false
|
| 9 |
+
license: mit
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# HenAi - Multi-Provider AI Assistant
|
| 13 |
+
|
| 14 |
+
An all-in-one AI assistant with document processing, image generation, media search, and more!
|
| 15 |
+
|
| 16 |
+
## Features
|
| 17 |
+
- 🤖 AI Chat (Pollinations.ai + OpenRouter)
|
| 18 |
+
- 🎨 Free Image Generation
|
| 19 |
+
- 📄 Document Creation & Processing
|
| 20 |
+
- 🔍 Unified File Search
|
| 21 |
+
- 🖼️ Media Search (Images & Videos)
|
| 22 |
+
- 💻 Built-in IDE Workspace
|
| 23 |
+
- 📁 File Management System
|
| 24 |
+
|
| 25 |
+
## Environment Variables Required
|
| 26 |
+
Set these in your Space settings under "Repository secrets":
|
| 27 |
+
- `OPENROUTER_API_KEY` - For AI code generation
|
| 28 |
+
- `PIXABAY_API_KEY` - For image search
|
| 29 |
+
- `PEXELS_API_KEY` - For video search
|
| 30 |
+
- `TWELVELABS_API_KEY` - For video analysis (optional)
|
| 31 |
+
- `GIPHY_API_KEY` - For GIF search (optional)
|
| 32 |
+
|
| 33 |
+
## Usage
|
| 34 |
+
Simply type your message and press Send! Use commands like:
|
| 35 |
+
- `/help` - Show all commands
|
| 36 |
+
- `/generate sunset` - Generate an image
|
| 37 |
+
- `/search query` - Search the web
|
| 38 |
+
- `/code print('hello')` - Execute Python code
|
dockerignore
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
__pycache__
|
| 2 |
+
*.pyc
|
| 3 |
+
*.pyo
|
| 4 |
+
*.pyd
|
| 5 |
+
.Python
|
| 6 |
+
*.so
|
| 7 |
+
*.egg
|
| 8 |
+
*.egg-info
|
| 9 |
+
dist
|
| 10 |
+
build
|
| 11 |
+
*.db
|
| 12 |
+
*.sqlite
|
| 13 |
+
*.sqlite3
|
| 14 |
+
.DS_Store
|
| 15 |
+
.git
|
| 16 |
+
.gitignore
|
| 17 |
+
README.md
|
| 18 |
+
.vscode
|
| 19 |
+
.idea
|
| 20 |
+
*.log
|
| 21 |
+
generated_images/*
|
| 22 |
+
generated_docs/*
|
| 23 |
+
processed_docs/*
|
| 24 |
+
temp_docs/*
|
| 25 |
+
!generated_images/.gitkeep
|
| 26 |
+
!generated_docs/.gitkeep
|
| 27 |
+
!processed_docs/.gitkeep
|
| 28 |
+
!temp_docs/.gitkeep
|
gitattributes
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
+
*.xz fil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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Already in your list (keeping your versions):
|
| 2 |
+
bleach
|
| 3 |
+
blinker
|
| 4 |
+
certifi
|
| 5 |
+
charset-normalizer
|
| 6 |
+
click
|
| 7 |
+
colorama
|
| 8 |
+
Flask
|
| 9 |
+
Flask-Cors
|
| 10 |
+
gunicorn
|
| 11 |
+
idna
|
| 12 |
+
itsdangerous
|
| 13 |
+
Jinja2
|
| 14 |
+
lxml
|
| 15 |
+
Markdown
|
| 16 |
+
MarkupSafe
|
| 17 |
+
packaging
|
| 18 |
+
Pygments
|
| 19 |
+
PyPDF2
|
| 20 |
+
python-docx
|
| 21 |
+
python-dotenv
|
| 22 |
+
requests
|
| 23 |
+
six
|
| 24 |
+
typing_extensions
|
| 25 |
+
urllib3
|
| 26 |
+
webencodings
|
| 27 |
+
Werkzeug
|
| 28 |
+
Pillow
|
| 29 |
+
opencv-python-headless
|
| 30 |
+
pydub
|
| 31 |
+
SpeechRecognition
|
| 32 |
+
librosa
|
| 33 |
+
moviepy
|
| 34 |
+
pdfplumber
|
| 35 |
+
python-pptx
|
| 36 |
+
patool
|
| 37 |
+
pefile
|
| 38 |
+
pyelftools
|
| 39 |
+
#python-magic-bin
|
| 40 |
+
exifread
|
| 41 |
+
pytesseract
|
| 42 |
+
easyocr
|
| 43 |
+
openpyxl
|
| 44 |
+
fontTools
|
| 45 |
+
mutagen
|
| 46 |
+
chardet
|
| 47 |
+
beautifulsoup4
|
| 48 |
+
pandas
|
| 49 |
+
|
| 50 |
+
# Additional packages needed for docs.py:
|
| 51 |
+
|
| 52 |
+
# PDF Processing
|
| 53 |
+
reportlab
|
| 54 |
+
|
| 55 |
+
# Spreadsheets
|
| 56 |
+
xlrd
|
| 57 |
+
xlwt
|
| 58 |
+
pyxlsb
|
| 59 |
+
|
| 60 |
+
# Data Formats
|
| 61 |
+
pyyaml
|
| 62 |
+
toml
|
| 63 |
+
h5py
|
| 64 |
+
netCDF4
|
| 65 |
+
|
| 66 |
+
# Archives
|
| 67 |
+
py7zr
|
| 68 |
+
rarfile
|
| 69 |
+
|
| 70 |
+
# Database
|
| 71 |
+
sqlalchemy
|
| 72 |
+
records
|
| 73 |
+
|
| 74 |
+
# Audio/Video
|
| 75 |
+
ffmpeg-python
|
| 76 |
+
|
| 77 |
+
# Scientific
|
| 78 |
+
scipy
|
| 79 |
+
numpy
|
| 80 |
+
pyreadstat
|
| 81 |
+
|
| 82 |
+
# Business/Financial
|
| 83 |
+
ofxparse
|
| 84 |
+
|
| 85 |
+
# CAD/3D
|
| 86 |
+
ezdxf
|
| 87 |
+
numpy-stl
|
| 88 |
+
trimesh
|
| 89 |
+
|
| 90 |
+
# Ebooks
|
| 91 |
+
ebooklib
|
| 92 |
+
|
| 93 |
+
# Markup/Web
|
| 94 |
+
mistune
|
| 95 |
+
|
| 96 |
+
# Code Analysis
|
| 97 |
+
jedi
|
| 98 |
+
black
|
| 99 |
+
autopep8
|
| 100 |
+
|
| 101 |
+
# Security
|
| 102 |
+
cryptography
|
| 103 |
+
pyOpenSSL
|
| 104 |
+
|
| 105 |
+
# Machine Learning (if needed)
|
| 106 |
+
tensorflow
|
| 107 |
+
torch
|
| 108 |
+
onnx
|
| 109 |
+
joblib
|
| 110 |
+
|
| 111 |
+
# ==================== FREE IMAGE GENERATION ====================
|
| 112 |
+
|
| 113 |
+
# Core local generation (requires GPU)
|
| 114 |
+
diffusers
|
| 115 |
+
transformers
|
| 116 |
+
accelerate
|
| 117 |
+
safetensors
|
| 118 |
+
torch
|
| 119 |
+
torchvision
|
| 120 |
+
|
| 121 |
+
# Optional optimizations (free, makes it faster)
|
| 122 |
+
xformers
|
| 123 |
+
einops
|
| 124 |
+
bitsandbytes
|
| 125 |
+
|
| 126 |
+
# For Replicate (free credits)
|
| 127 |
+
replicate
|
| 128 |
+
|
| 129 |
+
prompt-toolkit
|
| 130 |
+
psutil
|
| 131 |
+
pathlib2
|
| 132 |
+
|
| 133 |
+
# ==================== USER AUTHENTICATION & DATABASE ====================
|
| 134 |
+
|
| 135 |
+
# Flask extensions for authentication and database
|
| 136 |
+
Flask-Login
|
| 137 |
+
Flask-SQLAlchemy
|
| 138 |
+
Flask-WTF
|
| 139 |
+
email-validator
|
| 140 |
+
requests-oauthlib
|
| 141 |
+
oauthlib
|
| 142 |
+
|
| 143 |
+
# Database (SQLite is built-in, but these are for compatibility)
|
| 144 |
+
alembic
|
| 145 |
+
|
| 146 |
+
# Email handling (SMTP)
|
| 147 |
+
secure-smtplib
|
| 148 |
+
|
| 149 |
+
# Password hashing (werkzeug already included, but adding for clarity)
|
| 150 |
+
# werkzeug is already in your list above
|
| 151 |
+
|
| 152 |
+
# Session management
|
| 153 |
+
itsdangerous # Already in your list, keeping for reference
|
| 154 |
+
|
| 155 |
+
# ==================== GOOGLE OAUTH (Optional) ====================
|
| 156 |
+
|
| 157 |
+
# For Google OAuth login
|
| 158 |
+
authlib
|
| 159 |
+
httpx
|
| 160 |
+
|
| 161 |
+
# ==================== ADDITIONAL UTILITIES ====================
|
| 162 |
+
|
| 163 |
+
# For rate limiting (optional)
|
| 164 |
+
limits
|
| 165 |
+
redis # If using Redis for rate limiting (optional)
|
| 166 |
+
|
| 167 |
+
# For user activity logging
|
| 168 |
+
user-agents
|