Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
iQuxLE committed Dec 2, 2024
1 parent f4c6c56 commit 2a5e7a4
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/curategpt/agents/huggingface_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,12 @@ def upload(self, objects, metadata, repo_id, private=False, **kwargs):

embedding_file = "embeddings.parquet"
metadata_file = "metadata.yaml"
print("\n\n")
print(objects[0][0])
print(objects[0][2]['_embeddings'])
print(objects[0][2]['documents'])
print("\n\n")

try:
df = pd.DataFrame(data=[(obj[0], obj[2]['_embeddings'], obj[2]['document']) for obj in objects])
except Exception as e:
# df = pd.DataFrame(data=[(obj[0], obj[2]['_embeddings'], obj[2]['documents']) for obj in objects])
# logger.info(f"df changed")
raise ValueError(f"Creation of Dataframe not successful: {e}") from e


with ExitStack() as stack:
tmp_parquet = stack.enter_context(tempfile.NamedTemporaryFile(suffix=".parquet", delete=True))
tmp_yaml = stack.enter_context(tempfile.NamedTemporaryFile(suffix=".yaml", delete=True))
Expand Down

0 comments on commit 2a5e7a4

Please sign in to comment.