Update README.md
Browse files
README.md
CHANGED
|
@@ -29,8 +29,13 @@ A Hugging Face Gradio application that generates CLIP-ready visual descriptions
|
|
| 29 |
1. Go to [Hugging Face Spaces](https://huggingface.co/spaces)
|
| 30 |
2. Click "Create new Space"
|
| 31 |
3. Choose "Gradio" as the SDK
|
| 32 |
-
4. Upload `app.py`
|
| 33 |
-
5.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
|
| 35 |
### 2. Prepare Your CSV Files
|
| 36 |
|
|
@@ -46,15 +51,16 @@ Equipment,additional_data
|
|
| 46 |
|
| 47 |
### 3. Use the Application
|
| 48 |
|
| 49 |
-
1. **
|
| 50 |
-
2. **
|
| 51 |
-
3. **
|
| 52 |
-
4. **Adjust Settings** (optional):
|
| 53 |
- Max Tokens: 64-512 (default: 256)
|
| 54 |
- Temperature: 0.1-1.0 (default: 0.7)
|
| 55 |
- Top-p: 0.1-1.0 (default: 0.9)
|
| 56 |
-
|
| 57 |
-
|
|
|
|
|
|
|
| 58 |
|
| 59 |
## Output Format
|
| 60 |
|
|
@@ -88,13 +94,19 @@ Car Rental For Self Driven,"a car available for self-drive rental, parked at a p
|
|
| 88 |
|
| 89 |
## Troubleshooting
|
| 90 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
### "Column not found" error
|
| 92 |
- Check that the column name matches exactly (case-sensitive)
|
| 93 |
- View the error message to see available columns
|
| 94 |
|
| 95 |
-
###
|
| 96 |
-
-
|
| 97 |
-
- Check that
|
|
|
|
| 98 |
|
| 99 |
### Slow processing
|
| 100 |
- The model processes each unique category individually
|
|
@@ -106,10 +118,22 @@ Car Rental For Self Driven,"a car available for self-drive rental, parked at a p
|
|
| 106 |
To run locally:
|
| 107 |
|
| 108 |
```bash
|
|
|
|
| 109 |
pip install -r requirements.txt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 110 |
python app.py
|
| 111 |
```
|
| 112 |
|
|
|
|
|
|
|
| 113 |
## License
|
| 114 |
|
| 115 |
This project uses the Llama 3.3 model which requires agreement to Meta's license terms.
|
|
|
|
| 29 |
1. Go to [Hugging Face Spaces](https://huggingface.co/spaces)
|
| 30 |
2. Click "Create new Space"
|
| 31 |
3. Choose "Gradio" as the SDK
|
| 32 |
+
4. Upload `app.py`, `requirements.txt`, and `README.md`
|
| 33 |
+
5. **Enable OAuth (Required)**:
|
| 34 |
+
- Go to your Space's Settings
|
| 35 |
+
- Scroll to "OAuth" section
|
| 36 |
+
- Enable "OAuth" toggle
|
| 37 |
+
- This allows the app to use your HF Pro account's API access
|
| 38 |
+
6. Your app will be deployed automatically!
|
| 39 |
|
| 40 |
### 2. Prepare Your CSV Files
|
| 41 |
|
|
|
|
| 51 |
|
| 52 |
### 3. Use the Application
|
| 53 |
|
| 54 |
+
1. **Upload Files**: Upload one or more CSV files
|
| 55 |
+
2. **Specify Column**: Enter the name of the column containing categories (default: "category")
|
| 56 |
+
3. **Adjust Settings** (optional):
|
|
|
|
| 57 |
- Max Tokens: 64-512 (default: 256)
|
| 58 |
- Temperature: 0.1-1.0 (default: 0.7)
|
| 59 |
- Top-p: 0.1-1.0 (default: 0.9)
|
| 60 |
+
4. **Process**: Click "Process Files" and wait for completion
|
| 61 |
+
5. **Download**: Download the output CSV files with descriptions
|
| 62 |
+
|
| 63 |
+
*Note: Authentication is handled automatically through HF Spaces OAuth when enabled in settings.*
|
| 64 |
|
| 65 |
## Output Format
|
| 66 |
|
|
|
|
| 94 |
|
| 95 |
## Troubleshooting
|
| 96 |
|
| 97 |
+
### "Hugging Face token not found" error
|
| 98 |
+
- Make sure OAuth is enabled in your Space settings
|
| 99 |
+
- Go to Space Settings → OAuth → Enable OAuth toggle
|
| 100 |
+
- Restart your Space after enabling OAuth
|
| 101 |
+
|
| 102 |
### "Column not found" error
|
| 103 |
- Check that the column name matches exactly (case-sensitive)
|
| 104 |
- View the error message to see available columns
|
| 105 |
|
| 106 |
+
### Authentication errors
|
| 107 |
+
- Ensure you have a Hugging Face Pro account for API access
|
| 108 |
+
- Check that OAuth is properly configured in Space settings
|
| 109 |
+
- Verify that your account has access to the Llama 3.3 model
|
| 110 |
|
| 111 |
### Slow processing
|
| 112 |
- The model processes each unique category individually
|
|
|
|
| 118 |
To run locally:
|
| 119 |
|
| 120 |
```bash
|
| 121 |
+
# Install dependencies
|
| 122 |
pip install -r requirements.txt
|
| 123 |
+
|
| 124 |
+
# Set your Hugging Face token as an environment variable
|
| 125 |
+
# Windows (PowerShell):
|
| 126 |
+
$env:HF_TOKEN="your_hf_token_here"
|
| 127 |
+
|
| 128 |
+
# Linux/Mac:
|
| 129 |
+
export HF_TOKEN="your_hf_token_here"
|
| 130 |
+
|
| 131 |
+
# Run the app
|
| 132 |
python app.py
|
| 133 |
```
|
| 134 |
|
| 135 |
+
Get your token from: https://huggingface.co/settings/tokens
|
| 136 |
+
|
| 137 |
## License
|
| 138 |
|
| 139 |
This project uses the Llama 3.3 model which requires agreement to Meta's license terms.
|