surahj
commited on
Commit
·
f023565
1
Parent(s):
79b8226
Fix HF Spaces build error: minimal requirements.txt and remove unnecessary files
Browse files- Procfile +0 -1
- build.sh +0 -17
- deploy.py +0 -16
- render.yaml +0 -15
- requirements-render.txt +0 -7
- requirements.txt +3 -26
- runtime.txt +0 -1
Procfile
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
web: python src/app.py
|
|
|
|
|
|
build.sh
DELETED
|
@@ -1,17 +0,0 @@
|
|
| 1 |
-
#!/bin/bash
|
| 2 |
-
# Build script for Render deployment
|
| 3 |
-
|
| 4 |
-
echo "Starting build process..."
|
| 5 |
-
|
| 6 |
-
# Upgrade pip
|
| 7 |
-
python3 -m pip install --upgrade pip
|
| 8 |
-
|
| 9 |
-
# Install requirements
|
| 10 |
-
echo "Installing requirements..."
|
| 11 |
-
pip install -r requirements.txt
|
| 12 |
-
|
| 13 |
-
# Create necessary directories
|
| 14 |
-
mkdir -p logs
|
| 15 |
-
mkdir -p models
|
| 16 |
-
|
| 17 |
-
echo "Build completed successfully!"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
deploy.py
DELETED
|
@@ -1,16 +0,0 @@
|
|
| 1 |
-
#!/usr/bin/env python3
|
| 2 |
-
"""
|
| 3 |
-
Deployment script for Render deployment
|
| 4 |
-
"""
|
| 5 |
-
|
| 6 |
-
import os
|
| 7 |
-
import sys
|
| 8 |
-
from src.app import main
|
| 9 |
-
|
| 10 |
-
if __name__ == "__main__":
|
| 11 |
-
# Set environment variables for production
|
| 12 |
-
os.environ.setdefault("GRADIO_SERVER_NAME", "0.0.0.0")
|
| 13 |
-
os.environ.setdefault("GRADIO_SERVER_PORT", os.environ.get("PORT", "7860"))
|
| 14 |
-
|
| 15 |
-
# Launch the application
|
| 16 |
-
main()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
render.yaml
DELETED
|
@@ -1,15 +0,0 @@
|
|
| 1 |
-
services:
|
| 2 |
-
- type: web
|
| 3 |
-
name: electricity-consumption-predictor
|
| 4 |
-
env: python
|
| 5 |
-
plan: free
|
| 6 |
-
buildCommand: chmod +x build.sh && ./build.sh
|
| 7 |
-
startCommand: python3 src/app.py
|
| 8 |
-
envVars:
|
| 9 |
-
- key: PYTHON_VERSION
|
| 10 |
-
value: 3.10.12
|
| 11 |
-
- key: GRADIO_SERVER_NAME
|
| 12 |
-
value: 0.0.0.0
|
| 13 |
-
- key: GRADIO_SERVER_PORT
|
| 14 |
-
value: 7860
|
| 15 |
-
healthCheckPath: /
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
requirements-render.txt
DELETED
|
@@ -1,7 +0,0 @@
|
|
| 1 |
-
# Minimal requirements for Render deployment
|
| 2 |
-
scikit-learn==1.3.0
|
| 3 |
-
pandas==2.0.3
|
| 4 |
-
numpy==1.24.3
|
| 5 |
-
joblib==1.3.2
|
| 6 |
-
gradio==3.40.1
|
| 7 |
-
gunicorn==21.2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
requirements.txt
CHANGED
|
@@ -4,32 +4,9 @@ pandas==2.0.3
|
|
| 4 |
numpy==1.24.3
|
| 5 |
joblib==1.3.2
|
| 6 |
|
| 7 |
-
# Web Application
|
| 8 |
gradio==3.40.1
|
| 9 |
-
gradio_client==1.11.0
|
| 10 |
|
| 11 |
-
# Testing
|
| 12 |
pytest==7.4.0
|
| 13 |
-
pytest-cov==4.1.0
|
| 14 |
-
pytest-asyncio==0.21.1
|
| 15 |
-
pytest-env==1.1.3
|
| 16 |
-
pytest-mock==3.12.0
|
| 17 |
-
|
| 18 |
-
# Production Server
|
| 19 |
-
gunicorn==21.2.0
|
| 20 |
-
|
| 21 |
-
# Type Checking
|
| 22 |
-
typeguard==4.4.3
|
| 23 |
-
|
| 24 |
-
# Data Generation (for testing)
|
| 25 |
-
Faker==20.1.0
|
| 26 |
-
|
| 27 |
-
# HTTP and API
|
| 28 |
-
fastapi==0.104.1
|
| 29 |
-
uvicorn==0.24.0
|
| 30 |
-
python-multipart==0.0.6
|
| 31 |
-
|
| 32 |
-
# Utilities
|
| 33 |
-
python-dotenv==1.0.0
|
| 34 |
-
Pillow==9.0.1
|
| 35 |
-
matplotlib==3.10.3
|
|
|
|
| 4 |
numpy==1.24.3
|
| 5 |
joblib==1.3.2
|
| 6 |
|
| 7 |
+
# Web Application (Gradio)
|
| 8 |
gradio==3.40.1
|
|
|
|
| 9 |
|
| 10 |
+
# Testing (optional for deployment)
|
| 11 |
pytest==7.4.0
|
| 12 |
+
pytest-cov==4.1.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
runtime.txt
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
python-3.10.12
|
|
|
|
|
|