Issue with Space Hardware

#752
by alta96R - opened

hey there,
why when i duplicate the space there is no free space hardware like in the example that in the agent course ?
anybody know how to solve this problem ?

image
Same issue - How do we get the free hardware to run this space?

yeah it very annoying, i tried every thing in that page and nothing worked yet

I did this:

1.Clone the Space Repository Locally:

Terminal.Spaces are Git repositories. Notice the Clone (git) tab sitting beside the Docker tab in your second screenshot.

Run the following command to download the code to your local machine:

git clone https://huggingface.co/spaces/agents-course/First_agent_template my-agent cd my-agent

Alternatively, if you prefer not to use Git, extract the files directly from the Docker image:

mkdir my-agent && cd my-agent docker run --rm -v "$(pwd):/out" registry.hf.space/agents-course-first-agent-template:latest cp -r /home/user/app/. /out/

Verification: Run ls in the directory.

You should see app.py, prompts.yaml, and requirements.txt.

2.Open the Project in VS Code:
From within the my-agent directory, open VS Code:

code .

Open app.py in the VS Code editor panel so it is ready for modification.

Verification: Confirm that app.py is open and visible in your VS Code workspace.

3.Launch the Container with a Bind Mount and Hot-Reload:

Run the container by mounting your local directory (-v "$(pwd)":/home/user/app), ensuring the host is set to listen on 0.0.0.0, and replacing python app.py with gradio app.py to enable file watching:

docker run -it --rm \ -p 7860:7860 \ --platform=linux/amd64 \ -v "$(pwd)":/home/user/app \ -e GRADIO_SERVER_NAME="0.0.0.0" \ -e HF_TOKEN="your_hf_token_here" \ registry.hf.space/agents-course-first-agent-template:latest \ gradio app.py

Verification: Navigate to http://localhost:7860/ to confirm the agent interface is active.
In VS Code, make a small modification in app.py (such as changing a string in a prompt or tool description) and press Ctrl+S. Check your terminal —Gradio will log that changes were detected and reload the server without restarting the container.

thank you! i will try this way.

Let me know how you get on - It "works" in that I can run it, but the code fails. It cannot import pytz and the LLM just outputs the time in an unformatted way i.e. not using the tool. I have given up

yeah me too , i gave the code to the chatgpt to fix it but still not working.

Sign up or log in to comment