Spaces:
Paused
Paused
Update app.py
Browse files33 unmodified lines34353637383940321 unmodified lines362363364365366367368224 unmodified lines59359459559659759859933 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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"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"]if app_mode == "AI Agent Creator":# AI Agent Creator224 unmodified linesif 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 APIapi = 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"33 unmodified lines34353637383940321 unmodified lines362363364365366367368224 unmodified lines59359459559659759859933 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 = 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"]if app_mode == "AI Agent Creator":# AI Agent Creator224 unmodified linesif 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 APIapi = 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