amogneandualem commited on
Commit
ee53cfb
Β·
verified Β·
1 Parent(s): add9801

Update Dockerfile

Browse files
Files changed (1) hide show
  1. 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 for object detection and multilingual image description deployed on Hugging Face Spaces.
15
 
16
- ## πŸš€ Features
17
- - **πŸ“Έ Multiple Input Methods**: Upload, camera, or sample images
18
- - **🌍 13 Languages**: English, Spanish, French, German, Chinese, Hindi, Arabic, and more
19
- - **πŸ” Real-time Object Detection**: Powered by YOLOv8
20
- - **πŸ“ Intelligent Captioning**: Using BLIP model from Salesforce
21
- - **πŸ“Š Interactive Analytics**: Charts, statistics, and visualizations
22
- - **πŸ’Ύ Export Options**: Download results as JSON or TXT
23
 
24
- ## πŸ› οΈ Tech Stack
25
- - **Frontend**: Streamlit
26
- - **AI Models**:
27
- - BLIP (Salesforce) - Image captioning
28
- - YOLOv8 (Ultralytics) - Object detection
29
- - **Deployment**: Hugging Face Spaces
30
 
31
- ## πŸ“‹ How to Use
32
- 1. **Upload Image**: Drag & drop or click to upload
33
- 2. **Select Language**: Choose from available languages
34
- 3. **Generate**: Click the "Generate Description" button
35
- 4. **Explore**: View results across multiple tabs
36
- 5. **Export**: Download results as JSON or TXT
37
 
38
- ## πŸ”§ Configuration Notes
39
- The settings above (title, emoji, SDK, etc.) are configured in the YAML block at the top of this file.
 
 
40
 
41
- For additional configuration options, refer to the [Spaces configuration reference](https://huggingface.co/docs/hub/spaces-config-reference)[citation:2].
 
 
 
42
 
43
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
 
45
- Built with ❀️ by UCAS @2025 | Powered by Hugging Face Spaces
 
 
 
 
 
 
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