mod allegro

This commit is contained in:
l.gabrysiak 2025-02-28 21:09:05 +01:00
parent c5e4fc68c9
commit 46e2c21cfd
1 changed files with 12 additions and 7 deletions

View File

@ -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!")
"""