File size: 940 Bytes
954b9d0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
from huggingface_hub import HfApi
api = HfApi()

# Имя существующего датасета
dataset_name = "Rulga/status-law-knowledge-base"

# Создаем структуру с пустыми файлами
try:
    # Создаем .gitkeep в vector_store
    api.upload_file(
        path_or_fileobj=b"",  # пустой файл
        path_in_repo="vector_store/.gitkeep",
        repo_id=dataset_name,
        repo_type="dataset"
    )
    print("✓ Создана папка vector_store")

    # Создаем .gitkeep в chat_history
    api.upload_file(
        path_or_fileobj=b"",
        path_in_repo="chat_history/.gitkeep",
        repo_id=dataset_name,
        repo_type="dataset"
    )
    print("✓ Создана папка chat_history")

    print("\nСтруктура датасета успешно создана!")

except Exception as e:
    print(f"Произошла ошибка: {str(e)}")