-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Visualization, Powerpoint, Misc. Cleanup (#49)
* wip on visualizing dataset contents and vectors * remove docling * Make datasets represent individasiual docs * hi lite * make the hover point size bigger for stronger highlighting * highlight even stronger! * refactor and add a question entry box to show where the question lies in the vector space * a bit of refactoring and fix unused imports * force mypy into happiness * Update release version to dev-testing * fix types * disable input while loading * mark loading while viz is loading * clear up some warnings * make the active tab sticky on the ds management page * small refactoring * small refactor * "wip on visualization cleanup" * "now we're thinking with UMAP tooltips" * "styling" * "viz layout, continued." * "now we're thinking with dependency hell" * "add dependencies" * add the last dependency needed for powerpoint parsing * add other powerpoints * turn on the no-kb query toggle * tidy up the chunk metadata handling * use models for models * update uv.lock from main * delete log file --------- Co-authored-by: Michael Liu <[email protected]> Co-authored-by: actions-user <[email protected]> Co-authored-by: Elijah Williams <[email protected]>
- Loading branch information
1 parent
4f9178e
commit e9b721c
Showing
21 changed files
with
775 additions
and
39 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# | ||
# CLOUDERA APPLIED MACHINE LEARNING PROTOTYPE (AMP) | ||
# (C) Cloudera, Inc. 2024 | ||
# All rights reserved. | ||
# | ||
# Applicable Open Source License: Apache 2.0 | ||
# | ||
# NOTE: Cloudera open source products are modular software products | ||
# made up of hundreds of individual components, each of which was | ||
# individually copyrighted. Each Cloudera open source product is a | ||
# collective work under U.S. Copyright Law. Your license to use the | ||
# collective work is as provided in your written agreement with | ||
# Cloudera. Used apart from the collective work, this file is | ||
# licensed for your use pursuant to the open source license | ||
# identified above. | ||
# | ||
# This code is provided to you pursuant a written agreement with | ||
# (i) Cloudera, Inc. or (ii) a third-party authorized to distribute | ||
# this code. If you do not have a written agreement with Cloudera nor | ||
# with an authorized and properly licensed third party, you do not | ||
# have any rights to access nor to use this code. | ||
# | ||
# Absent a written agreement with Cloudera, Inc. ("Cloudera") to the | ||
# contrary, A) CLOUDERA PROVIDES THIS CODE TO YOU WITHOUT WARRANTIES OF ANY | ||
# KIND; (B) CLOUDERA DISCLAIMS ANY AND ALL EXPRESS AND IMPLIED | ||
# WARRANTIES WITH RESPECT TO THIS CODE, INCLUDING BUT NOT LIMITED TO | ||
# IMPLIED WARRANTIES OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY AND | ||
# FITNESS FOR A PARTICULAR PURPOSE; (C) CLOUDERA IS NOT LIABLE TO YOU, | ||
# AND WILL NOT DEFEND, INDEMNIFY, NOR HOLD YOU HARMLESS FOR ANY CLAIMS | ||
# ARISING FROM OR RELATED TO THE CODE; AND (D)WITH RESPECT TO YOUR EXERCISE | ||
# OF ANY RIGHTS GRANTED TO YOU FOR THE CODE, CLOUDERA IS NOT LIABLE FOR ANY | ||
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, PUNITIVE OR | ||
# CONSEQUENTIAL DAMAGES INCLUDING, BUT NOT LIMITED TO, DAMAGES | ||
# RELATED TO LOST REVENUE, LOST PROFITS, LOSS OF INCOME, LOSS OF | ||
# BUSINESS ADVANTAGE OR UNAVAILABILITY, OR LOSS OR CORRUPTION OF | ||
# DATA. | ||
# | ||
|
||
from pathlib import Path | ||
from typing import Any, List | ||
|
||
from llama_index.core.schema import TextNode | ||
from llama_index.readers.file import PptxReader as LlamaIndexPptxReader | ||
|
||
from .base_reader import BaseReader | ||
|
||
|
||
class PptxReader(BaseReader): | ||
def __init__(self, *args: Any, **kwargs: Any) -> None: | ||
super().__init__(*args, **kwargs) | ||
self.inner = LlamaIndexPptxReader() | ||
|
||
def load_chunks(self, file_path: Path) -> List[TextNode]: | ||
documents = self.inner.load_data(file_path) | ||
assert len(documents) == 1 | ||
document = documents[0] | ||
document.id_ = self.document_id | ||
self._add_document_metadata(document, file_path) | ||
return self._chunks_in_document(document) |
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
Oops, something went wrong.