Spaces:
Paused
Paused
Update app.py
Browse files33 unmodified lines3435363737383940321 unmodified lines362363364365365366367368224 unmodified lines59359459559659659759859933 unmodified lines# Set your Hugging Face API key here# hf_token = "YOUR_HUGGING_FACE_API_KEY" # Replace with your actual token# Get Hugging Face token from secrets.toml - this line should already be in the main codehf_token = "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"HF_TOKEN = os.environ.get("huggingface")
HUGGING_FACE_REPO_URL = "https://huggingface.co/spaces/acecalisto3/DevToolKit"PROJECT_ROOT = "projects"321 unmodified linesapp_mode = st.sidebar.selectbox("Choose the app mode", ["AI Agent Creator", "Tool Box", "Workspace Chat App"])
# Get Hugging Face token from secrets.tomlhf_token = st.secrets["huggingface"]["hf_token"]hf_token = st.secrets["huggingface"]
if app_mode == "AI Agent Creator": # AI Agent Creator224 unmodified lines if agent._hf_api and agent.has_valid_hf_token(): agent.deploy_built_space_to_hf() # Use the hf_token to interact with the Hugging Face API api = HfApi(token=hf_token) api = HfApi(token="hf_token") # Function to create a Space on Hugging Facedef create_space(api, name, description, public, files, entrypoint="launch.py"): url = f"{hf_hub_url()}spaces/{name}/prepare-repo"app.py+3-3