Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +68 -27
Dockerfile
CHANGED
|
@@ -4,42 +4,83 @@ emoji: π
|
|
| 4 |
colorFrom: blue
|
| 5 |
colorTo: purple
|
| 6 |
sdk: streamlit
|
| 7 |
-
sdk_version: 1.28.1
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
---
|
| 11 |
|
| 12 |
-
# π Multilingual Image Describer
|
| 13 |
|
| 14 |
-
A powerful web application
|
| 15 |
|
| 16 |
-
##
|
| 17 |
-
-
|
| 18 |
-
-
|
| 19 |
-
-
|
| 20 |
-
-
|
| 21 |
-
-
|
| 22 |
-
- **πΎ Export Options**: Download results as JSON or TXT
|
| 23 |
|
| 24 |
-
##
|
| 25 |
-
- **Frontend**: Streamlit
|
| 26 |
-
- **AI Models**:
|
| 27 |
-
- BLIP (Salesforce) - Image captioning
|
| 28 |
-
- YOLOv8 (Ultralytics) - Object detection
|
| 29 |
-
- **Deployment**: Hugging Face Spaces
|
| 30 |
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
4. **Explore**: View results across multiple tabs
|
| 36 |
-
5. **Export**: Download results as JSON or TXT
|
| 37 |
|
| 38 |
-
|
| 39 |
-
|
|
|
|
|
|
|
| 40 |
|
| 41 |
-
|
|
|
|
|
|
|
|
|
|
| 42 |
|
| 43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
|
| 45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
colorFrom: blue
|
| 5 |
colorTo: purple
|
| 6 |
sdk: streamlit
|
| 7 |
+
sdk_version: "1.28.1"
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# π Multilingual Image Describer with Real Translation
|
| 13 |
|
| 14 |
+
A powerful web application that analyzes images to detect objects and generate descriptions in **14 different languages** with real translation capabilities.
|
| 15 |
|
| 16 |
+
## β¨ Features
|
| 17 |
+
- **Real-time Translation**: Uses Hugging Face NLLB model for accurate translations
|
| 18 |
+
- **Object Detection**: Powered by YOLOv8 with confidence scores
|
| 19 |
+
- **Image Captioning**: Generates natural language descriptions using BLIP
|
| 20 |
+
- **14 Languages**: English, Spanish, French, German, Chinese, Hindi, Arabic, Russian, Japanese, Korean, Portuguese, Italian, Amharic, Turkish
|
| 21 |
+
- **Export Results**: Download analysis as JSON or TXT files
|
|
|
|
| 22 |
|
| 23 |
+
## π How to Use
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
|
| 25 |
+
### 1. Upload Image
|
| 26 |
+
- Click "Upload" to select an image file
|
| 27 |
+
- Use "Camera" to capture a photo
|
| 28 |
+
- Try "Sample" for a demo image
|
|
|
|
|
|
|
| 29 |
|
| 30 |
+
### 2. Configure Settings
|
| 31 |
+
- **Select Language**: Choose from 14 available languages
|
| 32 |
+
- **API Token**: Optional Hugging Face token for better translation
|
| 33 |
+
- **Confidence**: Adjust object detection sensitivity
|
| 34 |
|
| 35 |
+
### 3. Analyze
|
| 36 |
+
- Click "π Analyze Image" to process
|
| 37 |
+
- View results in Description, Objects, and Export tabs
|
| 38 |
+
- Download results for later use
|
| 39 |
|
| 40 |
+
## π§ Translation Setup
|
| 41 |
+
|
| 42 |
+
For best translation results:
|
| 43 |
+
|
| 44 |
+
1. **Get a free Hugging Face token**:
|
| 45 |
+
- Visit [huggingface.co/settings/tokens](https://huggingface.co/settings/tokens)
|
| 46 |
+
- Create a new token (select "Read" permission)
|
| 47 |
+
- Copy the token (starts with `hf_`)
|
| 48 |
+
|
| 49 |
+
2. **Enter token in the app**:
|
| 50 |
+
- Paste token in the "Hugging Face Token" field in sidebar
|
| 51 |
+
- Token is stored locally for your session
|
| 52 |
+
|
| 53 |
+
## π Supported Languages
|
| 54 |
+
|
| 55 |
+
| Language | Code | Support |
|
| 56 |
+
|----------|------|---------|
|
| 57 |
+
| English | en | β
Full |
|
| 58 |
+
| Spanish | es | β
Full |
|
| 59 |
+
| French | fr | β
Full |
|
| 60 |
+
| German | de | β
Full |
|
| 61 |
+
| Chinese | zh | β
Full |
|
| 62 |
+
| Hindi | hi | β
Full |
|
| 63 |
+
| Arabic | ar | β
Full |
|
| 64 |
+
| Russian | ru | β
Full |
|
| 65 |
+
| Japanese | ja | β
Full |
|
| 66 |
+
| Korean | ko | β
Full |
|
| 67 |
+
| Portuguese | pt | β
Full |
|
| 68 |
+
| Italian | it | β
Full |
|
| 69 |
+
| Amharic | am | β
Full |
|
| 70 |
+
| Turkish | tr | β
Full |
|
| 71 |
+
|
| 72 |
+
## π Technical Details
|
| 73 |
+
|
| 74 |
+
- **Image Models**: BLIP (captioning) + YOLOv8 (detection)
|
| 75 |
+
- **Translation**: Facebook NLLB-200-distilled-600M via Hugging Face Inference API
|
| 76 |
+
- **Framework**: Streamlit + Python 3.10
|
| 77 |
+
- **Deployment**: Hugging Face Spaces
|
| 78 |
+
|
| 79 |
+
## π οΈ Development
|
| 80 |
|
| 81 |
+
### Local Setup
|
| 82 |
+
```bash
|
| 83 |
+
git clone https://huggingface.co/spaces/amogneandualem/amogne-vlm-LLM
|
| 84 |
+
cd amogne-vlm-LLM
|
| 85 |
+
pip install -r requirements.txt
|
| 86 |
+
streamlit run app.py
|