Skip to content

Commit 3d34ea6

Browse files
authored
Merge pull request #384 from liaoliaojun/fix/merge
fix: TypeError ‘Model provided by the configuration not supported’
2 parents c31706f + 62b372b commit 3d34ea6

File tree

4 files changed

+433
-19
lines changed

4 files changed

+433
-19
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11

22
# 🕷️ ScrapeGraphAI: You Only Scrape Once
33
[English](https://github.com/VinciGit00/Scrapegraph-ai/blob/main/README.md) | [中文](https://github.com/VinciGit00/Scrapegraph-ai/blob/main/docs/chinese.md) | [日本語](https://github.com/VinciGit00/Scrapegraph-ai/blob/main/docs/japanese.md)
4+
| [코리아노](https://github.com/VinciGit00/Scrapegraph-ai/blob/main/docs/korean.md)
5+
| [русский](https://github.com/VinciGit00/Scrapegraph-ai/blob/main/docs/russian.md)
6+
47

58
[![Downloads](https://img.shields.io/pepy/dt/scrapegraphai?style=for-the-badge)](https://pepy.tech/project/scrapegraphai)
69
[![linting: pylint](https://img.shields.io/badge/linting-pylint-yellowgreen?style=for-the-badge)](https://github.com/pylint-dev/pylint)

docs/korean.md

Lines changed: 210 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,210 @@
1+
# 🕷️ ScrapeGraphAI: 한 번만 스크래핑하세요
2+
3+
4+
ScrapeGraphAI는 웹 사이트와 로컬 문서(XML, HTML, JSON 등)에 대한 스크래핑 파이프라인을 만들기 위해 LLM 및 직접 그래프 로직을 사용하는 파이썬 웹 스크래핑 라이브러리입니다.
5+
6+
추출하려는 정보를 말하기만 하면 라이브러리가 알아서 처리해 줍니다!
7+
8+
<p align="center">
9+
<img src="https://raw.githubusercontent.com/VinciGit00/Scrapegraph-ai/main/docs/assets/scrapegraphai_logo.png" alt="Scrapegraph-ai Logo" style="width: 50%;">
10+
</p>
11+
12+
## 🚀 빠른 설치
13+
14+
Scrapegraph-ai에 대한 참조 페이지는 PyPI의 공식 페이지에서 확인할 수 있습니다: pypi.
15+
16+
bash
17+
Copia codice
18+
pip install scrapegraphai
19+
참고: 다른 라이브러리와의 충돌을 피하기 위해 라이브러리를 가상 환경에 설치하는 것이 좋습니다 🐱
20+
21+
## 🔍 데모
22+
23+
공식 Streamlit 데모:
24+
25+
26+
27+
Google Colab을 사용하여 웹에서 직접 사용해 보세요:
28+
29+
30+
31+
## 📖 문서
32+
33+
ScrapeGraphAI에 대한 문서는 여기에서 찾을 수 있습니다.
34+
35+
또한 Docusaurus를 여기에서 확인해 보세요.
36+
37+
## 💻 사용법
38+
39+
웹 사이트(또는 로컬 파일)에서 정보를 추출하는 데 사용할 수 있는 세 가지 주요 스크래핑 파이프라인이 있습니다:
40+
41+
SmartScraperGraph: 사용자 프롬프트와 입력 소스만 필요한 단일 페이지 스크래퍼;
42+
SearchGraph: 검색 엔진의 상위 n개의 검색 결과에서 정보를 추출하는 다중 페이지 스크래퍼;
43+
SpeechGraph: 웹 사이트에서 정보를 추출하고 오디오 파일을 생성하는 단일 페이지 스크래퍼.
44+
SmartScraperMultiGraph: 단일 프롬프트를 사용하여 여러 페이지를 스크래핑하는 스크래퍼
45+
OpenAI, Groq, Azure, Gemini와 같은 API를 통해 다양한 LLM을 사용할 수 있으며, Ollama를 사용하여 로컬 모델을 사용할 수도 있습니다.
46+
47+
사례 1: 로컬 모델을 사용하는 SmartScraper
48+
Ollama를 설치하고 ollama pull 명령을 사용하여 모델을 다운로드하세요.
49+
50+
```python
51+
from scrapegraphai.graphs import SmartScraperGraph
52+
53+
graph_config = {
54+
"llm": {
55+
"model": "ollama/mistral",
56+
"temperature": 0,
57+
"format": "json", # Ollama는 형식을 명시적으로 지정해야 합니다
58+
"base_url": "http://localhost:11434", # Ollama URL 설정
59+
},
60+
"embeddings": {
61+
"model": "ollama/nomic-embed-text",
62+
"base_url": "http://localhost:11434", # Ollama URL 설정
63+
},
64+
"verbose": True,
65+
}
66+
67+
smart_scraper_graph = SmartScraperGraph(
68+
prompt="프로젝트와 설명을 모두 나열하세요",
69+
# 이미 다운로드된 HTML 코드가 있는 문자열도 허용
70+
source="https://perinim.github.io/projects",
71+
config=graph_config
72+
)
73+
74+
result = smart_scraper_graph.run()
75+
print(result)
76+
```
77+
78+
출력은 다음과 같이 프로젝트와 설명의 목록이 될 것입니다:
79+
80+
```python
81+
{'projects': [{'title': 'Rotary Pendulum RL', 'description': 'RL 알고리즘을 사용하여 실제 회전 진자를 제어하는 오픈 소스 프로젝트'}, {'title': 'DQN Implementation from scratch', 'description': '간단한 및 이중 진자를 훈련하기 위한 딥 Q-네트워크 알고리즘 개발'}, ...]}
82+
사례 2: 혼합 모델을 사용하는 SearchGraph
83+
우리는 LLM에 Groq를 사용하고, 임베딩에 Ollama를 사용합니다.
84+
```
85+
86+
```python
87+
from scrapegraphai.graphs import SearchGraph
88+
89+
# 그래프 구성 정의
90+
graph_config = {
91+
"llm": {
92+
"model": "groq/gemma-7b-it",
93+
"api_key": "GROQ_API_KEY",
94+
"temperature": 0
95+
},
96+
"embeddings": {
97+
"model": "ollama/nomic-embed-text",
98+
"base_url": "http://localhost:11434", # Ollama URL 임의 설정
99+
},
100+
"max_results": 5,
101+
}
102+
103+
# SearchGraph 인스턴스 생성
104+
search_graph = SearchGraph(
105+
prompt="Chioggia의 전통 레시피를 모두 나열하세요",
106+
config=graph_config
107+
)
108+
109+
# 그래프 실행
110+
result = search_graph.run()
111+
print(result)
112+
출력은 다음과 같이 레시피 목록이 될 것입니다:
113+
```
114+
115+
```python
116+
{'recipes': [{'name': 'Sarde in Saòre'}, {'name': 'Bigoli in salsa'}, {'name': 'Seppie in umido'}, {'name': 'Moleche frite'}, {'name': 'Risotto alla pescatora'}, {'name': 'Broeto'}, {'name': 'Bibarasse in Cassopipa'}, {'name': 'Risi e bisi'}, {'name': 'Smegiassa Ciosota'}]}
117+
사례 3: OpenAI를 사용하는 SpeechGraph
118+
OpenAI API 키와 모델 이름만 전달하면 됩니다.
119+
```
120+
121+
```python
122+
from scrapegraphai.graphs import SpeechGraph
123+
124+
graph_config = {
125+
"llm": {
126+
"api_key": "OPENAI_API_KEY",
127+
"model": "gpt-3.5-turbo",
128+
},
129+
"tts_model": {
130+
"api_key": "OPENAI_API_KEY",
131+
"model": "tts-1",
132+
"voice": "alloy"
133+
},
134+
"output_path": "audio_summary.mp3",
135+
}
136+
137+
# ************************************************
138+
# SpeechGraph 인스턴스를 생성하고 실행합니다.
139+
# ************************************************
140+
141+
speech_graph = SpeechGraph(
142+
prompt="프로젝트에 대한 자세한 오디오 요약을 만드세요.",
143+
source="https://perinim.github.io/projects/",
144+
config=graph_config,
145+
)
146+
147+
result = speech_graph.run()
148+
print(result)
149+
```
150+
151+
출력은 페이지의 프로젝트 요약이 포함된 오디오 파일이 될 것입니다.
152+
153+
후원사
154+
155+
<div style="text-align: center;">
156+
<a href="https://serpapi.com?utm_source=scrapegraphai">
157+
<img src="https://raw.githubusercontent.com/VinciGit00/Scrapegraph-ai/main/docs/assets/serp_api_logo.png" alt="SerpAPI" style="width: 10%;">
158+
</a>
159+
<a href="https://dashboard.statproxies.com/?refferal=scrapegraph">
160+
<img src="https://raw.githubusercontent.com/VinciGit00/Scrapegraph-ai/main/docs/assets/transparent_stat.png" alt="Stats" style="width: 15%;">
161+
</a>
162+
</div>
163+
164+
## 🤝 기여
165+
166+
기여를 환영하며, 개선 사항을 논의하고 제안 사항을 주고받기 위해 우리의 Discord 서버에 참여하세요!
167+
168+
기여 가이드라인을 참조하십시오.
169+
170+
## 📈 로드맵
171+
172+
프로젝트 로드맵을 여기에서 확인하세요! 🚀
173+
174+
로드맵을 더 인터랙티브하게 시각화하고 싶으신가요? markdown 내용을 편집기에 복사하여 markmap 시각화를 확인하세요!
175+
176+
## ️ 기여자들
177+
178+
179+
180+
## 🎓 인용
181+
182+
우리의 라이브러리를 연구 목적으로 사용한 경우 다음과 같이 인용해 주세요:
183+
184+
text
185+
Copia codice
186+
@misc{scrapegraph-ai,
187+
author = {Marco Perini, Lorenzo Padoan, Marco Vinciguerra},
188+
title = {Scrapegraph-ai},
189+
year = {2024},
190+
url = {https://github.com/VinciGit00/Scrapegraph-ai},
191+
note = {대규모 언어 모델을 활용한 Python 스크레이핑 라이브러리}
192+
}
193+
저자들
194+
195+
<p align="center">
196+
<img src="https://raw.githubusercontent.com/VinciGit00/Scrapegraph-ai/main/docs/assets/logo_authors.png" alt="Authors_logos">
197+
</p>
198+
연락처
199+
Marco Vinciguerra
200+
Marco Perini
201+
Lorenzo Padoan
202+
203+
## 📜 라이선스
204+
205+
ScrapeGraphAI는 MIT License로 라이선스가 부여되었습니다. 자세한 내용은 LICENSE 파일을 참조하세요.
206+
207+
감사의 말
208+
209+
프로젝트에 기여한 모든 분들과 오픈 소스 커뮤니티에 감사드립니다.
210+
ScrapeGraphAI는 데이터 탐색 및 연구 목적으로만 사용되어야 합니다. 우리는 라이브러리의 오용에 대해 책임을 지지 않습니다.

0 commit comments

Comments
 (0)