Spaces:
Build error

File size: 1,038 Bytes
633b29b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52039c7
633b29b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
33
34
35
36
37
38
39
40
41
42
43
44
45
import os
from huggingface_hub import HfApi
from dotenv import load_dotenv

# Load environment variables
load_dotenv()

# Get Hugging Face token
HF_TOKEN = os.getenv("HF_TOKEN")
if not HF_TOKEN:
    raise ValueError("HF_TOKEN not found in environment variables")

# Initialize Hugging Face Hub client
api = HfApi(token=HF_TOKEN)

# Files to upload
files_to_upload = [
    "app.py",
    "deep_research.py",
    "research_manager.py",
    "Search_Evaluator.py",
    "planner_agent.py",
    "email_agent.py",
    "writer_agent.py",
    "search_agent.py",
    "agents.py",
    "requirements.txt",
    "README.md"
]

# Upload each file
for file in files_to_upload:
    if os.path.exists(file):
        print(f"Uploading {file}...")
        api.upload_file(
            path_or_fileobj=file,
            path_in_repo=file,
            repo_id="atamalik/SmartResearcher",
            repo_type="space"
        )
        print(f"Successfully uploaded {file}")
    else:
        print(f"Warning: {file} not found")

print("Deployment completed!")