Skip to content

Commit

Permalink
fixed merge
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromehardaway committed Oct 24, 2024
2 parents 14d6a37 + e4aaafd commit 27675b6
Show file tree
Hide file tree
Showing 20 changed files with 388 additions and 52 deletions.
Binary file removed .DS_Store
Binary file not shown.
4 changes: 4 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[run]
omit =
tests/*
*/tests/*
23 changes: 23 additions & 0 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Run Unit Tests with Pytest

on: [ push, pull_request ]

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run tests with coverage report
run: |
pytest --cov --cov-report=term-missing
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ __pycache__/
# C extensions
*.so

.DS_Store

# Distribution / packaging
.Python
build/
Expand Down
94 changes: 46 additions & 48 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,11 @@ VetsAI is an AI-powered virtual assistant designed to help veterans navigate emp
- **Chat Assistant**: Ask questions and receive advice on job searching and career transitions.
- **Military Job Code Translation**: Provide a military job code (e.g., MOS, AFSC) to get suggestions for related civilian careers.
- **Document Upload**: Upload employment-related documents (PDF or DOCX), and VetsAI will process the content to assist with career suggestions.
- **OpenAI Integration**: Uses OpenAIs GPT-4 to generate responses based on the conversation context.
- **OpenAI Integration**: Uses OpenAI's GPT-4 to generate responses based on the conversation context.

## Prerequisites

To run this application, ensure you have the following installed:

- Python 3.8 or later
- A virtual environment (recommended)

Expand All @@ -22,62 +21,61 @@ To run this application, ensure you have the following installed:
```bash
git clone <repository-url>
cd <repository-directory>
```

2. Set up a virtual environment:

python -m venv venv
source venv/bin/activate # For macOS/Linux
.\venv\Scripts\activate # For Windows


3. Install dependencies:

pip install -r requirements.txt


4. Set up environment variables:
• Create a .env file in the root of your project.
• Add your OpenAI API key to the .env file:

OPENAI_API_KEY=your-openai-api-key


2. **Set up a virtual environment**:
```bash
python -m venv venv
source venv/bin/activate # For macOS/Linux
.\venv\Scripts\activate # For Windows
```

Running the App
3. **Install dependencies**:
```bash
pip install -r requirements.txt
```

1. Run the Streamlit app:
4. **Set up environment variables**:
- Create a .env file in the root of your project.
- Add your OpenAI API key to the .env file:
```
OPENAI_API_KEY=your-openai-api-key
```
streamlit run app.py
## Running the App
1. **Run the Streamlit app**:
```bash
streamlit run app.py
```

2. Access the app:
Open your web browser and navigate to http://localhost:8501.
2. **Access the app**:
Open your web browser and navigate to http://localhost:8501.

Usage
## Usage

Chat: Ask questions about job searching, resume building, and military job code translations.
Upload Resume: Upload a resume (PDF or DOCX), and VetsAI will process the text for further assistance.
Military Job Codes: Enter your military job code (e.g., MOS, AFSC) to get suggestions for civilian careers.
- **Chat**: Ask questions about job searching, resume building, and military job code translations.
- **Upload Resume**: Upload a resume (PDF or DOCX), and VetsAI will process the text for further assistance.
- **Military Job Codes**: Enter your military job code (e.g., MOS, AFSC) to get suggestions for civilian careers.

File Structure
## File Structure

app.py: Main application script.
data/employment_transitions/job_codes/: Directory containing military job code files.
requirements.txt: Python package dependencies.
- `app.py`: Main application script.
- `data/employment_transitions/job_codes/`: Directory containing military job code files.
- `requirements.txt`: Python package dependencies.

Dependencies
## Dependencies

The following Python libraries are required to run this app:

• streamlit: For the web interface.
• httpx: To make HTTP requests to OpenAI’s API.
• nest-asyncio: To allow nested event loops for async operations.
• better-profanity: To filter profane language.
• PyPDF2: For extracting text from PDF files.
• python-docx: For reading DOCX files.
• python-dotenv: To load environment variables from a .env file.
• openai: To interact with OpenAI’s API.

License

This project is licensed under the MIT License.
- `streamlit`: For the web interface.
- `httpx`: To make HTTP requests to OpenAI's API.
- `nest-asyncio`: To allow nested event loops for async operations.
- `better-profanity`: To filter profane language.
- `PyPDF2`: For extracting text from PDF files.
- `python-docx`: For reading DOCX files.
- `python-dotenv`: To load environment variables from a .env file.
- `openai`: To interact with OpenAI's API.

## License

This project is licensed under the MIT License.
Binary file removed data/.DS_Store
Binary file not shown.
Binary file removed data/employment_transitions/.DS_Store
Binary file not shown.
Binary file removed data/employment_transitions/job_codes/.DS_Store
Binary file not shown.
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ PyPDF2>=3.0.0
python-docx>=1.0.0
python-dotenv>=1.0.0
openai>=1.3.0
# New dependencies for enhanced features
tenacity>=8.2.3
typing-extensions>=4.8.0
python-json-logger>=2.0.7
Expand All @@ -15,4 +14,4 @@ tiktoken>=0.5.1
cachetools>=5.3.2
dataclasses-json>=0.6.1
asyncio>=3.4.3
aiohttp>=3.9.1
aiohttp>=3.9.1
Loading

0 comments on commit 27675b6

Please sign in to comment.