A newer version of the Gradio SDK is available:
5.44.1
Hugging Face Spaces Setup Guide
Quick Deployment to Hugging Face Spaces
1. Create a New Space
- Go to Hugging Face Spaces
- Click "Create new Space"
- Choose:
- Space name:
business-card-extractor
- License:
mit
- Space SDK:
gradio
- Visibility:
public
orprivate
- Space name:
2. Upload Files
Upload these files to your space:
app.py
requirements.txt
prompts/prompt.txt
prompts/system_prompt.txt
README.md
business_cards/.gitkeep
Note: The business_cards/
and business_card_exports/
directories will be created automatically.
3. Set Environment Variables
Go to your Space Settings
Scroll to Repository secrets
Click Add a new secret
Add these secrets:
Required:
- Name:
Gemini_API
- Value: Your AI API key
Optional (for password protection):
- Name:
SPACE_PASSWORD
- Value: Your desired password
- Note: Users will login with username:
user
and this password
- Name:
4. Get Your AI API Key
- Go to Google AI Studio
- Click "Get API key"
- Create a new API key
- Copy the key for use in step 3
5. Your Space is Ready!
- The space will automatically build and deploy
- It will be available at:
https://huggingface.co/spaces/YOUR_USERNAME/business-card-extractor
- All business card images and Excel files will be saved in the space
Features Available in Hugging Face Spaces
β
Full functionality: All features work in Hugging Face Spaces
β
Image storage: Business cards saved to business_cards/
folder
β
Excel exports: Download both current run and cumulative files
β
Persistent storage: All data preserved between sessions
β
Batch processing: Efficient 5-cards-per-API-call processing
Environment Variables Required
Gemini_API
: Your AI API key (required)SPACE_PASSWORD
: Password for space access (optional)
Notes
- The space will create necessary directories automatically
- Logs are available in the space's terminal/logs
- All uploaded images are processed and optionally saved
- Excel files accumulate over time in the cumulative database