VinciGit00 / Scrapegraph-ai

Python scraper based on AI

Home Page:https://scrapegraphai.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

run zhe examples/local_models/smart_scraper_ollama.py

gitama2016 opened this issue · comments

File "/root/miniconda3/envs/scrapegraphai/lib/python3.10/site-packages/scrapegraphai/utils/cleanup_html.py", line 65, in cleanup_html
raise ValueError("No HTML body content found, please try setting the 'headless' flag to False in the graph configuration.")
ValueError: No HTML body content found, please try setting the 'headless' flag to False in the graph configuration.

Hi, you should have done this
graph_config = {
"llm": {
"model": "ollama/llama3",
"temperature": 0,
"format": "json", # Ollama needs the format to be specified explicitly
"model_tokens": 4000,
},
"embeddings": {
"model": "ollama/nomic-embed-text",
"temperature": 0,
},
"verbose": True,
"headless": False,
}