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

LLAMA_PARSE PERFORM BADLY IN THAI LANGUAGE!? or it's my mistake? #401

Open
FRAMEEE17 opened this issue Sep 14, 2024 · 1 comment
Open

LLAMA_PARSE PERFORM BADLY IN THAI LANGUAGE!? or it's my mistake? #401

FRAMEEE17 opened this issue Sep 14, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@FRAMEEE17
Copy link

image
def process_pdf_files(index):
    pdf_directory = "./data/documents"
    llama_parse = LlamaParse(result_type="markdown")
    
    for filename in os.listdir(pdf_directory):
        if filename.endswith(".pdf"):
            file_path = os.path.join(pdf_directory, filename)
            
            try:
                # Parse the PDF file
                documents = llama_parse.load_data(file_path)
                
                # Upload the parsed content to LlamaCloud
                for doc in documents:
                    index.insert(doc)
                
                logger.info(f"Uploaded: {filename}")
            except Exception as e:
                logger.error(f"Error processing {filename}: {str(e)}")
            
            # Add a small delay between files to avoid rate limiting
            time.sleep(1)

try to parse Thai pdf files and it doesn't work! It's my first time to use LLAMA_PARSE though.

@hexapode hexapode self-assigned this Sep 15, 2024
@hexapode hexapode added the bug Something isn't working label Sep 15, 2024
@hexapode
Copy link
Contributor

Could you share the doc you used with us so we can have a look? likely a font encoding issue given the screenshot you share

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants