Zaheer Khan commited on
Commit
2afc0b9
Β·
unverified Β·
1 Parent(s): 3ca8449

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +41 -39
README.md CHANGED
@@ -1,53 +1,55 @@
1
- Code Analyzer
2
- A Streamlit-based application to analyze Python (.py) and Jupyter Notebook (.ipynb) files using CodeBERT and Pylint.
3
- Project Structure
 
 
 
 
 
 
 
4
 
5
- app.py: Main Streamlit application.
6
- models/codebert.py: CodeBERT model loading and analysis logic.
7
- utils/code_utils.py: Pylint and Jupyter Notebook extraction utilities.
8
- static/uploads/: Folder for uploaded files.
9
- requirements.txt: Project dependencies.
10
 
11
- Setup Instructions
12
 
13
- Clone or Set Up the Project:
14
 
15
- Create a project folder named code_analyzer.
16
- Place the files in the structure described above.
17
 
 
 
 
 
 
18
 
19
- Install Dependencies:
20
 
21
- Ensure Python 3.8+ is installed.
22
- Run:pip install -r requirements.txt
23
 
 
 
 
24
 
 
 
 
25
 
26
-
27
- Run the Application:
28
-
29
- Navigate to the code_analyzer directory.
30
- Run:streamlit run app.py
31
-
32
-
33
  Open the provided URL (usually http://localhost:8501) in your browser.
34
 
 
 
 
35
 
36
- Usage:
37
-
38
- Upload a .py or .ipynb file via the Streamlit UI.
39
- View the analysis report with CodeBERT and Pylint feedback.
40
-
41
-
42
-
43
- Notes
44
-
45
- Ensure the static/uploads folder is created automatically or manually before running.
46
- If using a GPU, CodeBERT will utilize CUDA if available.
47
- Check logs in the terminal for debugging information.
48
-
49
- Troubleshooting
50
 
51
- Module Not Found: Verify all dependencies are installed (pip install -r requirements.txt).
52
- File Upload Issues: Ensure files are valid .py or .ipynb.
53
- CodeBERT Errors: Check internet connection for model downloading or GPU compatibility.
 
 
 
1
+ ---
2
+ title: AI Assignment Checker
3
+ emoji: πŸ“
4
+ colorFrom: purple
5
+ colorTo: pink
6
+ sdk: streamlit
7
+ sdk_version: "1.24.0"
8
+ app_file: app.py
9
+ pinned: false
10
+ ---
11
 
12
+ # πŸ“ Code Analyzer
 
 
 
 
13
 
14
+ A **Streamlit-based application** to analyze **Python (.py)** and **Jupyter Notebook (.ipynb)** files using **CodeBERT** and **Pylint**.
15
 
16
+ ---
17
 
18
+ ## πŸ“‚ Project Structure
 
19
 
20
+ - `app.py`: Main Streamlit application.
21
+ - `models/codebert.py`: CodeBERT model loading and analysis logic.
22
+ - `utils/code_utils.py`: Pylint and Jupyter Notebook extraction utilities.
23
+ - `static/uploads/`: Folder for uploaded files.
24
+ - `requirements.txt`: Project dependencies.
25
 
26
+ ---
27
 
28
+ ## βš™οΈ Setup Instructions
 
29
 
30
+ ### 1. Clone or Set Up the Project
31
+ git clone https://github.com/<username>/<repo>.git
32
+ cd code_analyzer
33
 
34
+ ### 2. Install Dependencies
35
+ Ensure Python 3.8+ is installed, then run:
36
+ pip install -r requirements.txt
37
 
38
+ ### 3. Run the Application
39
+ streamlit run app.py
 
 
 
 
 
40
  Open the provided URL (usually http://localhost:8501) in your browser.
41
 
42
+ ## πŸš€ Usage
43
+ ### 1. Upload a .py or .ipynb file via the Streamlit UI.
44
+ ### 2. View the analysis report with CodeBERT and Pylint feedback.
45
 
46
+ ## πŸ“ Notes
47
+ ### 1. Ensure the static/uploads folder exists (create it manually if needed).
48
+ ### 2. If using a GPU, CodeBERT will utilize CUDA if available.
49
+ ### 3.Check logs in the terminal for debugging information.
 
 
 
 
 
 
 
 
 
 
50
 
51
+ ## πŸ› οΈ Troubleshooting
52
+ ### 1. Module Not Found β†’ Verify all dependencies are installed:
53
+ pip install -r requirements.txt
54
+ ### 2. File Upload Issues β†’ Ensure files are valid .py or .ipynb.
55
+ ### 3.CodeBERT Errors β†’ Check internet connection for model downloading or GPU compatibility.