Ojochegbeng commited on
Commit
13929ce
Β·
verified Β·
1 Parent(s): 0a0b8f9

Delete deploy-to-hf.sh

Browse files
Files changed (1) hide show
  1. deploy-to-hf.sh +0 -50
deploy-to-hf.sh DELETED
@@ -1,50 +0,0 @@
1
- #!/bin/bash
2
-
3
- # Deploy Qwen Embedding Model to Hugging Face Spaces
4
- # Make sure you have the Hugging Face CLI installed and logged in
5
-
6
- echo "πŸš€ Deploying Qwen Embedding Model to Hugging Face Spaces..."
7
-
8
- # Check if HF CLI is installed
9
- if ! command -v huggingface-cli &> /dev/null; then
10
- echo "❌ Hugging Face CLI not found. Please install it first:"
11
- echo "pip install huggingface_hub[cli]"
12
- exit 1
13
- fi
14
-
15
- # Check if user is logged in
16
- if ! huggingface-cli whoami &> /dev/null; then
17
- echo "❌ Please log in to Hugging Face first:"
18
- echo "huggingface-cli login"
19
- exit 1
20
- fi
21
-
22
- # Get space name from user
23
- read -p "Enter your Hugging Face username: " HF_USERNAME
24
- read -p "Enter space name (e.g., qwen-embedding-api): " SPACE_NAME
25
-
26
- SPACE_URL="https://huggingface.co/spaces/$HF_USERNAME/$SPACE_NAME"
27
-
28
- echo "πŸ“¦ Creating Hugging Face Space..."
29
-
30
- # Create the space
31
- huggingface-cli repo create "$SPACE_NAME" --type space --sdk docker
32
-
33
- echo "πŸ“ Uploading files to the space..."
34
-
35
- # Upload files to the space
36
- huggingface-cli upload "$HF_USERNAME/$SPACE_NAME" ./Dockerfile ./Dockerfile
37
- huggingface-cli upload "$HF_USERNAME/$SPACE_NAME" ./requirements.txt ./requirements.txt
38
- huggingface-cli upload "$HF_USERNAME/$SPACE_NAME" ./app.py ./app.py
39
- huggingface-cli upload "$HF_USERNAME/$SPACE_NAME" ./README.md ./README.md
40
-
41
- echo "βœ… Deployment complete!"
42
- echo "🌐 Your space is available at: $SPACE_URL"
43
- echo "⏳ The space will take a few minutes to build and start."
44
- echo ""
45
- echo "πŸ”§ To update your PansGPT app:"
46
- echo "1. Update the API URL in your qwen-embedding-service.ts"
47
- echo "2. Replace the Gradio client with direct HTTP calls"
48
- echo "3. Test the new endpoint"
49
- echo ""
50
- echo "πŸ“Š Monitor your space at: $SPACE_URL"