Spaces:
Build error
Build error
Commit History
-
Create Dockerfile
Verified signature414fd1a -
Create app.py
Verified signature317d95a -
Create dockerfile
Verified signaturefrom huggingface_hub import HfApi from pathlib import Path # --- Configuration --- # Your Hugging Face username hf_username = "your-hf-username" # The name of the repository repo_name = "deepseek-chatbot" # The local path to your Dockerfile local_dockerfile_path = "Dockerfile" # The path where the file should be in the repository repo_dockerfile_path = "Dockerfile" # Your Hugging Face API token (replace with your actual token) hf_token = "your-hf-token" # --- Script --- api = HfApi() repo_id = f"{hf_username}/{repo_name}" # Read the content of the Dockerfile dockerfile_content = Path(local_dockerfile_path).read_text() # Commit the Dockerfile to the repository try: api.upload_file( path_or_fileobj=dockerfile_content.encode("utf-8"), path_in_repo=repo_dockerfile_path, repo_id=repo_id, token=hf_token, commit_message="Add Dockerfile for GPU support", ) print(f"File '{repo_dockerfile_path}' committed to repository '{repo_id}'.") except…6c6d5da -
Create app.py
Verified signaturefrom huggingface_hub import HfApi, HfFolder from pathlib import Path # --- Configuration --- # Your Hugging Face username hf_username = "your-hf-username" # The name of the new repository repo_name = "deepseek-chatbot" # The local path to your app.py file local_app_py_path = "app.py" # The path where the file should be in the repository repo_app_py_path = "app.py" # Your Hugging Face API token (replace with your actual token) hf_token = "your-hf-token" # --- Script --- api = HfApi() repo_id = f"{hf_username}/{repo_name}" # Create the repository if it doesn't exist try: api.create_repo(repo_id=repo_id, token=hf_token, repo_type="space", space_sdk="docker") print(f"Repository '{repo_id}' created on Hugging Face Hub.") except Exception as e: print(f"Repository '{repo_id}' may already exist: {e}") # Read the content of the app.py file app_py_content = Path(local_app_py_path).read_text() # Commit the app.py file to the repository try: api.upload_file( path_or_fi…1e2cce7 -
initial commit
Verified signature0d07e61