Spaces:
Sleeping
Sleeping
pranav8tripathi@gmail.com commited on
Commit Β·
1a02cf0
1
Parent(s): 4ede186
init
Browse files- .dockerignore +49 -0
- .streamlit/config.toml +17 -0
- Dockerfile +17 -3
- README.md +9 -10
- db/__init__.py +1 -0
- main.py +5 -3
.dockerignore
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Python
|
| 2 |
+
__pycache__/
|
| 3 |
+
*.py[cod]
|
| 4 |
+
*$py.class
|
| 5 |
+
*.so
|
| 6 |
+
.Python
|
| 7 |
+
*.egg-info/
|
| 8 |
+
dist/
|
| 9 |
+
build/
|
| 10 |
+
|
| 11 |
+
# Virtual environments
|
| 12 |
+
venv/
|
| 13 |
+
env/
|
| 14 |
+
ENV/
|
| 15 |
+
|
| 16 |
+
# IDE
|
| 17 |
+
.vscode/
|
| 18 |
+
.idea/
|
| 19 |
+
*.swp
|
| 20 |
+
*.swo
|
| 21 |
+
|
| 22 |
+
# Git
|
| 23 |
+
.git/
|
| 24 |
+
.gitignore
|
| 25 |
+
.gitattributes
|
| 26 |
+
|
| 27 |
+
# Database files (will be created fresh)
|
| 28 |
+
*.db
|
| 29 |
+
|
| 30 |
+
# Environment
|
| 31 |
+
.env
|
| 32 |
+
.env.local
|
| 33 |
+
|
| 34 |
+
# Logs
|
| 35 |
+
*.log
|
| 36 |
+
|
| 37 |
+
# OS
|
| 38 |
+
.DS_Store
|
| 39 |
+
Thumbs.db
|
| 40 |
+
|
| 41 |
+
# Backup files
|
| 42 |
+
*_backup.py
|
| 43 |
+
*.bak
|
| 44 |
+
|
| 45 |
+
# Test files
|
| 46 |
+
test_*.py
|
| 47 |
+
|
| 48 |
+
# Documentation
|
| 49 |
+
README.md
|
.streamlit/config.toml
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[server]
|
| 2 |
+
headless = true
|
| 3 |
+
port = 7860
|
| 4 |
+
address = "0.0.0.0"
|
| 5 |
+
enableCORS = false
|
| 6 |
+
enableXsrfProtection = false
|
| 7 |
+
|
| 8 |
+
[browser]
|
| 9 |
+
gatherUsageStats = false
|
| 10 |
+
serverAddress = "0.0.0.0"
|
| 11 |
+
serverPort = 7860
|
| 12 |
+
|
| 13 |
+
[theme]
|
| 14 |
+
primaryColor = "#6366f1"
|
| 15 |
+
backgroundColor = "#ffffff"
|
| 16 |
+
secondaryBackgroundColor = "#f0f2f6"
|
| 17 |
+
textColor = "#262730"
|
Dockerfile
CHANGED
|
@@ -23,14 +23,28 @@ RUN apt-get update && apt-get install -y \
|
|
| 23 |
COPY requirements.txt ./
|
| 24 |
|
| 25 |
# Install Python dependencies
|
| 26 |
-
RUN pip install --
|
| 27 |
-
|
|
|
|
| 28 |
|
| 29 |
# Copy the rest of the application
|
| 30 |
COPY . .
|
| 31 |
|
|
|
|
|
|
|
|
|
|
| 32 |
# Hugging Face Spaces uses port 7860
|
| 33 |
EXPOSE 7860
|
| 34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
# Launch Streamlit on Spaces' port (7860)
|
| 36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
COPY requirements.txt ./
|
| 24 |
|
| 25 |
# Install Python dependencies
|
| 26 |
+
RUN pip install --upgrade pip && \
|
| 27 |
+
pip install --no-cache-dir -r requirements.txt && \
|
| 28 |
+
pip install --no-cache-dir "httpx<0.28"
|
| 29 |
|
| 30 |
# Copy the rest of the application
|
| 31 |
COPY . .
|
| 32 |
|
| 33 |
+
# Create necessary directories
|
| 34 |
+
RUN mkdir -p /app/.streamlit /app/db
|
| 35 |
+
|
| 36 |
# Hugging Face Spaces uses port 7860
|
| 37 |
EXPOSE 7860
|
| 38 |
|
| 39 |
+
# Health check
|
| 40 |
+
HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \
|
| 41 |
+
CMD curl -f http://localhost:7860/_stcore/health || exit 1
|
| 42 |
+
|
| 43 |
# Launch Streamlit on Spaces' port (7860)
|
| 44 |
+
CMD ["streamlit", "run", "main.py", \
|
| 45 |
+
"--server.port=7860", \
|
| 46 |
+
"--server.address=0.0.0.0", \
|
| 47 |
+
"--server.headless=true", \
|
| 48 |
+
"--server.enableCORS=false", \
|
| 49 |
+
"--server.enableXsrfProtection=false", \
|
| 50 |
+
"--browser.gatherUsageStats=false"]
|
README.md
CHANGED
|
@@ -1,19 +1,18 @@
|
|
| 1 |
---
|
| 2 |
title: ResumeIQ
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: docker
|
| 7 |
-
app_port:
|
| 8 |
tags:
|
| 9 |
- streamlit
|
|
|
|
|
|
|
| 10 |
pinned: false
|
| 11 |
-
short_description:
|
| 12 |
---
|
| 13 |
|
| 14 |
-
#
|
| 15 |
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
If you have any questions, checkout our [documentation](https://docs.streamlit.io) and [community
|
| 19 |
-
forums](https://discuss.streamlit.io).
|
|
|
|
| 1 |
---
|
| 2 |
title: ResumeIQ
|
| 3 |
+
emoji: π
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: purple
|
| 6 |
sdk: docker
|
| 7 |
+
app_port: 7860
|
| 8 |
tags:
|
| 9 |
- streamlit
|
| 10 |
+
- resume-analyzer
|
| 11 |
+
- ai
|
| 12 |
pinned: false
|
| 13 |
+
short_description: AI-powered resume analyzer and job matching system
|
| 14 |
---
|
| 15 |
|
| 16 |
+
# ResumeIQ - AI Resume Analyzer
|
| 17 |
|
| 18 |
+
An intelligent resume analysis system that matches candidates with job descriptions using AI.
|
|
|
|
|
|
|
|
|
db/__init__.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
# Database module
|
main.py
CHANGED
|
@@ -31,14 +31,16 @@ DEEPSEEK_MODEL = os.getenv("DEEPSEEK_MODEL", "deepseek-chat")
|
|
| 31 |
DEEPSEEK_BASE_URL = os.getenv("DEEPSEEK_BASE_URL", "https://api.deepseek.com")
|
| 32 |
|
| 33 |
if not DEEPSEEK_API_KEY:
|
| 34 |
-
st.
|
| 35 |
-
st.
|
|
|
|
| 36 |
|
| 37 |
# Initialize database connection
|
| 38 |
try:
|
| 39 |
db = ResumeMatchDB()
|
| 40 |
except Exception as e:
|
| 41 |
-
st.error("β Database Connection Error")
|
|
|
|
| 42 |
|
| 43 |
# File Upload Section
|
| 44 |
uploaded_files = render_file_upload()
|
|
|
|
| 31 |
DEEPSEEK_BASE_URL = os.getenv("DEEPSEEK_BASE_URL", "https://api.deepseek.com")
|
| 32 |
|
| 33 |
if not DEEPSEEK_API_KEY:
|
| 34 |
+
st.warning("β οΈ DEEPSEEK_API_KEY not configured. Please set it in Hugging Face Space Settings β Repository secrets.")
|
| 35 |
+
st.info("π‘ Add `DEEPSEEK_API_KEY` as a secret in your Space settings to enable AI analysis.")
|
| 36 |
+
# Don't stop - let the UI load so users can see the interface
|
| 37 |
|
| 38 |
# Initialize database connection
|
| 39 |
try:
|
| 40 |
db = ResumeMatchDB()
|
| 41 |
except Exception as e:
|
| 42 |
+
st.error(f"β Database Connection Error: {str(e)}")
|
| 43 |
+
db = None
|
| 44 |
|
| 45 |
# File Upload Section
|
| 46 |
uploaded_files = render_file_upload()
|