Spaces:
Sleeping
Sleeping
Joash2024
commited on
Commit
·
21ba4fb
1
Parent(s):
ca1c07d
Remove token from config and add metadata
Browse files
.gitignore
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
__pycache__/
|
README.md
CHANGED
@@ -1,46 +1,40 @@
|
|
1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
-
|
4 |
|
5 |
-
|
6 |
|
7 |
-
- Automated code review
|
8 |
- Support for multiple programming languages
|
9 |
- Real-time feedback
|
10 |
- Performance metrics tracking
|
11 |
- Review history
|
12 |
|
13 |
-
##
|
14 |
-
|
15 |
-
The following environment variables need to be set in your Hugging Face Space:
|
16 |
-
|
17 |
-
- `HUGGING_FACE_TOKEN`: Your Hugging Face API token
|
18 |
-
- `MODEL_NAME`: google/gemma-2-2b-it
|
19 |
-
- `DEBUG`: false
|
20 |
-
- `LOG_LEVEL`: INFO
|
21 |
-
- `PORT`: 7860
|
22 |
-
|
23 |
-
## Deployment Instructions
|
24 |
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
- Space name: code-review-assistant
|
30 |
-
- License: Choose appropriate license
|
31 |
-
- SDK: Docker
|
32 |
-
4. Upload these files:
|
33 |
-
- All project files
|
34 |
-
- Rename `Dockerfile.huggingface` to `Dockerfile`
|
35 |
-
5. Set the environment variables in Space Settings
|
36 |
-
6. Deploy!
|
37 |
|
38 |
## Usage
|
39 |
|
40 |
-
|
41 |
-
|
|
|
|
|
42 |
|
43 |
-
##
|
44 |
|
45 |
-
|
46 |
-
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
title: Code Review Assistant
|
3 |
+
emoji: 🤖
|
4 |
+
colorFrom: blue
|
5 |
+
colorTo: green
|
6 |
+
sdk: docker
|
7 |
+
pinned: false
|
8 |
+
---
|
9 |
|
10 |
+
# Code Review Assistant
|
11 |
|
12 |
+
An automated code review system powered by Gemma-2b-it. This application provides:
|
13 |
|
14 |
+
- Automated code review suggestions
|
15 |
- Support for multiple programming languages
|
16 |
- Real-time feedback
|
17 |
- Performance metrics tracking
|
18 |
- Review history
|
19 |
|
20 |
+
## Features
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
|
22 |
+
- Code quality analysis
|
23 |
+
- Best practices recommendations
|
24 |
+
- Security checks
|
25 |
+
- Performance optimization suggestions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
|
27 |
## Usage
|
28 |
|
29 |
+
1. Select your programming language
|
30 |
+
2. Paste your code
|
31 |
+
3. Click "Submit for Review"
|
32 |
+
4. Get instant feedback on your code
|
33 |
|
34 |
+
## Technology Stack
|
35 |
|
36 |
+
- FastAPI
|
37 |
+
- Hugging Face Transformers
|
38 |
+
- Docker
|
39 |
+
- PostgreSQL
|
40 |
+
- Prometheus
|
src/__pycache__/__init__.cpython-311.pyc
DELETED
Binary file (441 Bytes)
|
|
src/__pycache__/api.cpython-311.pyc
DELETED
Binary file (9.37 kB)
|
|
src/__pycache__/code_reviewer.cpython-311.pyc
DELETED
Binary file (8.39 kB)
|
|
src/__pycache__/config.cpython-311.pyc
DELETED
Binary file (4.7 kB)
|
|
src/__pycache__/model_manager.cpython-311.pyc
DELETED
Binary file (3.66 kB)
|
|
src/config.py
CHANGED
@@ -26,7 +26,7 @@ class Config:
|
|
26 |
MAX_OUTPUT_LENGTH = int(os.getenv("MAX_OUTPUT_LENGTH", 1024))
|
27 |
TEMPERATURE = float(os.getenv("TEMPERATURE", 0.7))
|
28 |
TOP_P = float(os.getenv("TOP_P", 0.95))
|
29 |
-
HUGGING_FACE_TOKEN = os.getenv("HUGGING_FACE_TOKEN", "
|
30 |
|
31 |
# Database Settings
|
32 |
DATABASE_URL = os.getenv("DATABASE_URL", "sqlite:///./code_review.db")
|
|
|
26 |
MAX_OUTPUT_LENGTH = int(os.getenv("MAX_OUTPUT_LENGTH", 1024))
|
27 |
TEMPERATURE = float(os.getenv("TEMPERATURE", 0.7))
|
28 |
TOP_P = float(os.getenv("TOP_P", 0.95))
|
29 |
+
HUGGING_FACE_TOKEN = os.getenv("HUGGING_FACE_TOKEN", "")
|
30 |
|
31 |
# Database Settings
|
32 |
DATABASE_URL = os.getenv("DATABASE_URL", "sqlite:///./code_review.db")
|