Padmanav commited on
Commit
8658f8b
·
1 Parent(s): 406055d

fix: add HF Spaces metadata and fix Dockerfile entrypoint

Browse files
Files changed (3) hide show
  1. Dockerfile +5 -7
  2. README.md +10 -0
  3. gradio_app/app.py +2 -2
Dockerfile CHANGED
@@ -2,21 +2,19 @@ FROM python:3.11-slim
2
 
3
  WORKDIR /app
4
 
5
- # Install git (needed for GitPython)
6
  RUN apt-get update && apt-get install -y \
7
  git \
8
  && rm -rf /var/lib/apt/lists/*
9
 
10
- # Install dependencies
11
  COPY requirements.txt .
12
  RUN pip install --no-cache-dir -r requirements.txt
13
 
14
- # Copy app code
15
  COPY . .
16
 
17
- # Expose ports
18
- EXPOSE 8000
 
 
19
  EXPOSE 7860
20
 
21
- # Default command runs FastAPI
22
- CMD ["uvicorn", "app.api.main:app", "--host", "0.0.0.0", "--port", "8000"]
 
2
 
3
  WORKDIR /app
4
 
 
5
  RUN apt-get update && apt-get install -y \
6
  git \
7
  && rm -rf /var/lib/apt/lists/*
8
 
 
9
  COPY requirements.txt .
10
  RUN pip install --no-cache-dir -r requirements.txt
11
 
 
12
  COPY . .
13
 
14
+ ENV REPO_CLONE_DIR=/tmp/repositories
15
+ ENV APP_PORT=8000
16
+ ENV BACKEND_URL=http://localhost:8000/api/v1
17
+
18
  EXPOSE 7860
19
 
20
+ CMD ["sh", "-c", "python -m uvicorn app.api.main:app --host 0.0.0.0 --port 8000 & sleep 3 && python gradio_app/app.py"]
 
README.md CHANGED
@@ -1,3 +1,13 @@
 
 
 
 
 
 
 
 
 
 
1
  # 🤖 AI Code Review Agent
2
 
3
  A multi-agent AI platform that simulates a software engineering team using specialized agents for repository analysis, bug detection, code generation, testing, and code review.
 
1
+ ---
2
+ title: AI Code Review Agent
3
+ emoji: 🤖
4
+ colorFrom: purple
5
+ colorTo: blue
6
+ sdk: docker
7
+ app_port: 7860
8
+ pinned: false
9
+ ---
10
+
11
  # 🤖 AI Code Review Agent
12
 
13
  A multi-agent AI platform that simulates a software engineering team using specialized agents for repository analysis, bug detection, code generation, testing, and code review.
gradio_app/app.py CHANGED
@@ -1,9 +1,9 @@
1
  import gradio as gr
2
  import requests
3
  import json
 
4
 
5
- BACKEND_URL = "http://localhost:8000/api/v1"
6
-
7
 
8
  def analyze_repository(github_url: str, quick_mode: bool):
9
  """
 
1
  import gradio as gr
2
  import requests
3
  import json
4
+ import os
5
 
6
+ BACKEND_URL = os.getenv("BACKEND_URL", "http://localhost:8000/api/v1")
 
7
 
8
  def analyze_repository(github_url: str, quick_mode: bool):
9
  """