-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: make ci happy lint the code, delete unused imports
Signed-off-by: yihong0618 <[email protected]>
- Loading branch information
1 parent
562d5a9
commit b098a48
Showing
75 changed files
with
1,108 additions
and
822 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
#!/usr/bin/env python3 | ||
# -*- coding: utf-8 -*- | ||
|
||
import os | ||
import logging | ||
import sys | ||
|
||
from llama_index import SimpleDirectoryReader, GPTSimpleVectorIndex | ||
from llama_index import GPTSimpleVectorIndex, SimpleDirectoryReader | ||
|
||
logging.basicConfig(stream=sys.stdout, level=logging.INFO) | ||
logging.getLogger().addHandler(logging.StreamHandler(stream=sys.stdout)) | ||
|
||
# read the document of data dir | ||
documents = SimpleDirectoryReader("data").load_data() | ||
# split the document to chunk, max token size=500, convert chunk to vector | ||
# split the document to chunk, max token size=500, convert chunk to vector | ||
|
||
index = GPTSimpleVectorIndex(documents) | ||
|
||
# save index | ||
index.save_to_disk("index.json") | ||
index.save_to_disk("index.json") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
from pilot.source_embedding import (SourceEmbedding, register) | ||
from pilot.source_embedding import SourceEmbedding, register | ||
|
||
__all__ = [ | ||
"SourceEmbedding", | ||
"register" | ||
] | ||
__all__ = ["SourceEmbedding", "register"] |
Oops, something went wrong.