From 46e2c21cfdf207c4b69a2a23f2589aed085a4b3f Mon Sep 17 00:00:00 2001 From: "l.gabrysiak" Date: Fri, 28 Feb 2025 21:09:05 +0100 Subject: [PATCH] mod allegro --- allegro.py | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/allegro.py b/allegro.py index b6bbba7..65a5580 100644 --- a/allegro.py +++ b/allegro.py @@ -26,15 +26,19 @@ def fetch_documents(): response = collection.query.fetch_objects() documents = [] for item in response["data"]["Get"]["Document"]: - file_name = item.get("fileName", "unknown_file") - content = item.get("content", "") - if content: - documents.append(f"fileName: {file_name}, content: {content}") - print(f"fileName: {file_name}") - return documents + print(item) + #file_name = item.get("fileName", "unknown_file") + #content = item.get("content", "") + #if content: + # documents.append(f"fileName: {file_name}, content: {content}") + # print(f"fileName: {file_name}") + #return documents + #return documents -documents = fetch_documents() +fetch_documents() + +""" # 3️⃣ Inicjalizacja modelu model_name = "allegro/multislav-5lang" device = "cuda" if torch.cuda.is_available() else "cpu" @@ -99,3 +103,4 @@ model.save_pretrained("./models/allegro") tokenizer.save_pretrained("./models/allegro") print("✅ Model został wytrenowany i zapisany!") +""" \ No newline at end of file