Find answers from the community

t
tanzuo
Offline, last seen 3 months ago
Joined September 25, 2024
t
tanzuo
·

Huggingface

I get an error when using ImageVisionLLMReader from llama-hub: OSError: We couldn't connect to 'https://huggingface.co' to load this file, couldn't find it in the cached files and it looks like Salesforce/ blip2-opt-2.7b is not the path to a directory containing a file named preprocessor_config.json.
Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode'.
2 comments
t
L
This is my code
from pathlib import Path
from llama_index import download_loader

file_path=Path('/mnt/hub/data/***.pptx')
PptxReader = download_loader("PptxReader")

loader = PptxReader()
documents = loader.load_data(file=file_path)
print(documents)



ERROR
Traceback (most recent call last):
File "/mnt/hub/text/pptReader.py", line 5, in <module>
PptxReader = download_loader("PptxReader")
File "/root/miniconda3/envs/hub/lib/python3.8/site-packages/llama_index/readers/download.py", line 216, in download_loader
spec.loader.exec_module(module) # type: ignore
File "<frozen importlib._bootstrap_external>", line 839, in exec_module
File "<frozen importlib._bootstrap_external>", line 976, in get_code
File "<frozen importlib._bootstrap_external>", line 906, in source_to_code
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/root/miniconda3/envs/hub/lib/python3.8/site-packages/llama_index/readers/llamahub_modules/file/pptx/base.py", line 1
404: Not Found
^
SyntaxError: invalid syntax

May I ask what is the situation
2 comments
t
L
t
tanzuo
·

Import

ImportError: cannot import name 'download_loader' from partially initialized module 'llama_index' (most likely due to a circular import) (/root/miniconda3/envs/hub/lib/python3.8/site-packages/llama_index/init.py) llama-hub What is the problem with this happening at runtime
4 comments
t
L