File size: 1,231 Bytes
2acde71
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
@echo off

REM =====================================================

REM Hugging Face Space Deployment Script (Windows)

REM =====================================================



REM Step 1: Ask user for Hugging Face write-access token
set /p HF_TOKEN="Enter your Hugging Face write-access token: "



REM Step 2: Ask for Space name and SDK type
set /p SPACE_NAME="Enter the name of the Space (e.g., solana): "
set /p SPACE_SDK="Enter Space SDK (gradio / streamlit / docker / static): "



REM Step 3: Ask for your HF username (from hf auth whoami)
set /p HF_USER="Enter your Hugging Face username (from hf auth whoami): "



REM Step 4: Create the Space repo
hf repo create %HF_USER%/%SPACE_NAME% --repo-type space --space-sdk %SPACE_SDK% --token %HF_TOKEN%



REM Step 5: Upload the local folder to the Space
hf upload %HF_USER%/%SPACE_NAME% . . --repo-type space --commit-message "Initial upload" --token %HF_TOKEN%



REM Step 6: Print the deployed Space URL
echo.
echo =====================================================
echo Deployment complete!
echo Your Hugging Face Space is at:
echo https://huggingface.co/spaces/%HF_USER%/%SPACE_NAME%
echo =====================================================
pause