Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Files are not updated and build is stuck #128

Open
david-strejc opened this issue May 19, 2024 · 4 comments
Open

Files are not updated and build is stuck #128

david-strejc opened this issue May 19, 2024 · 4 comments

Comments

@david-strejc
Copy link

I got two issues.

First one is:

  • Build is stuck - what is the best way to debug this? - there is only "to backgroudn" and "stop" option

Second one:

in plnadex convo there is obvious conversation for updating Readme.md for example but the file isn't updated with new content.

What is the best way to debug this?

@danenania
Copy link
Contributor

Hey @david-strejc, if the build is stuck, you can press s to stop the stream and you might see an error message. Was this with cloud or self-hosted?

@danenania
Copy link
Contributor

On the Readme/file update issue, could you paste in the relevant portion of the convo if it’s not sensitive? Sometimes the model doesn’t follow instructions for labelling files, causing them to be missed by the parser. In those cases using plandex rewind to back up and try again can help. You can also give it additional prompting telling it to follow instructions for labelling files if that’s the issue. It’s hard to be sure without seeing the message though.

@david-strejc
Copy link
Author

Hey @david-strejc, if the build is stuck, you can press s to stop the stream and you might see an error message. Was this with cloud or self-hosted?

It was with cloud. Do you have access to details of cloud builds?

@david-strejc
Copy link
Author

david-strejc commented May 20, 2024

On the Readme/file update issue, could you paste in the relevant portion of the convo if it’s not sensitive? Sometimes the model doesn’t follow instructions for labelling files, causing them to be missed by the parser. In those cases using plandex rewind to back up and try again can help. You can also give it additional prompting telling it to follow instructions for labelling files if that’s the issue. It’s hard to be sure without seeing the message though.

15 | 🤖 Plandex | Sat May 18, 2024 | 11:35am CEST | 605 🪙

Subtask 7.2: Create Comprehensive Documentation

We'll create a README.md file to provide comprehensive documentation
detailing the application’s usage and features.

• README.md:

# PDF Processing Application                                              
                                                                          
## Overview                                                               
This application processes PDF files by splitting them into individual    

pages, creating screenshots of each page, and uploading these to OpenAI's
Vision model. The model extracts items into a structured JSON format. If the
extraction confidence is below a specified threshold, the invoice is also
processed by the GPT model to improve accuracy. The results from both models
are merged into a single structured JSON output.

## Features                                                               
- Split PDFs into individual pages                                        
- Convert PDF pages to images                                             
- Upload images to OpenAI Vision model                                    
- Evaluate extraction confidence                                          
- Process low-confidence items with GPT model                             
- Merge results from Vision and GPT models                                
- User-friendly interface using Streamlit                                 
- Download option for the resulting JSON file                             
                                                                          
## Installation                                                           
                                                                          
### Prerequisites                                                         
- Python 3.x                                                              
- Virtual environment (optional but recommended)                          
                                                                          
### Setup                                                                 
1. Clone the repository:                                                  
    ```sh                                                                 
    git clone <repository_url>                                            
    cd <repository_directory>                                             
    ```                                                                   
                                                                          
2. Create and activate a virtual environment:                             
    ```sh                                                                 
    python3 -m venv venv                                                  
    source venv/bin/activate                                              
    ```                                                                   
                                                                          
3. Install the required libraries:                                        
    ```sh                                                                 
    pip install -r requirements.txt                                       
    ```                                                                   
                                                                          
## Usage                                                                  
                                                                          
### Running the Application                                               
1. Start the Streamlit application:                                       
    ```sh                                                                 
    streamlit run app.py                                                  
    ```                                                                   
                                                                          
2. Open your web browser and go to `http://localhost:8501`.               
                                                                          
3. Enter your OpenAI API key and upload a PDF file.                       
                                                                          
4. The application will process the PDF and display the final structured  

JSON output.

5. You can download the JSON file using the download button.              
                                                                          
## Deployment                                                             
                                                                          
### Heroku                                                                
1. Create a `Procfile` with the following content:                        
    ```sh                                                                 
    web: streamlit run app.py                                             
    ```                                                                   
                                                                          
2. Create a `requirements.txt` file with the necessary libraries:         
    ```sh                                                                 
    streamlit                                                             
    PyPDF2                                                                
    Pillow                                                                
    openai                                                                
    requests                                                              
    pdf2image                                                             
    ```                                                                   
                                                                          
3. Deploy the application to Heroku following the standard deployment     

process.

## License                                                                
This project is licensed under the MIT License.                           
                                                                          
## Acknowledgements                                                       
- [Streamlit](https://streamlit.io/)                                      
- [PyPDF2](https://pypi.org/project/PyPDF2/)                              
- [Pillow](https://python-pillow.org/)                                    
- [OpenAI](https://openai.com/)                                           
- [pdf2image](https://pypi.org/project/pdf2image/)                        

Subtask 7.2 has been completed.

This was supposed to be in README.md updated but there was no update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants