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