Rizwan1010 commited on
Commit
04d1cc8
·
verified ·
1 Parent(s): fde6557

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +55 -10
README.md CHANGED
@@ -1,12 +1,57 @@
1
  ---
2
- title: Translator
3
- emoji: 🐠
4
- colorFrom: yellow
5
- colorTo: pink
6
- sdk: static
 
 
7
  pinned: false
8
- license: odbl
9
- short_description: UDtoENG
10
- ---
11
-
12
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ title: Urdu Hindi English AI Translator
3
+ emoji: 🌐
4
+ colorFrom: blue
5
+ colorTo: indigo
6
+ sdk: gradio
7
+ sdk_version: 5.49.1
8
+ app_file: app.py
9
  pinned: false
10
+ license: apache-2.0
11
+ python_version: "3.11"
12
+ Urdu, Hindi, Roman Urdu and Hinglish → English Translator
13
+ A Hugging Face Spaces-ready Gradio application for translating text, speech, video, documents, and scanned images into fluent English.
14
+ Included features
15
+ Urdu, Hindi, Roman Urdu, and Hinglish input
16
+ Automatic language detection
17
+ Faster-Whisper speech recognition
18
+ Browser microphone and audio upload
19
+ Video audio extraction using FFmpeg
20
+ PDF, DOCX, TXT, RTF, and image extraction
21
+ OCR for scanned pages and images
22
+ Free local translation path using open-source models
23
+ Optional OpenAI translation when `OPENAI_API_KEY` is configured
24
+ Natural, professional, business, academic, simplified, summary, and key-point output modes
25
+ Temporary session-only file handling
26
+ Deploy on Hugging Face Spaces
27
+ Create a new Hugging Face Space.
28
+ Select Gradio as the SDK.
29
+ For speech and local translation, choose a GPU hardware tier when available. CPU works but model loading and transcription will be slower.
30
+ Upload every file and folder from this package to the root of the Space repository.
31
+ Hugging Face will build and launch the application automatically.
32
+ The repository root must contain:
33
+ ```text
34
+ app.py
35
+ README.md
36
+ requirements.txt
37
+ packages.txt
38
+ translator_app/
39
+ ```
40
+ Optional Space secrets
41
+ In Settings → Variables and secrets, add any desired values:
42
+ `OPENAI_API_KEY`: enables the OpenAI translation mode
43
+ `OPENAI_MODEL`: defaults to `gpt-4.1-mini`
44
+ `WHISPER_MODEL`: defaults to `small`; use `base` for low-memory CPU Spaces
45
+ `NLLB_MODEL`: defaults to `facebook/nllb-200-distilled-600M`
46
+ `FLAN_MODEL`: defaults to `google/flan-t5-base`
47
+ `MAX_UPLOAD_MB`: defaults to `200`
48
+ Never place API keys directly in source files.
49
+ Hardware guidance
50
+ The default models can require several gigabytes of RAM and download time on first use. A GPU Space is recommended for responsive speech transcription. For a smaller CPU deployment, set `WHISPER_MODEL=base` and reduce `MAX_UPLOAD_MB`.
51
+ Privacy
52
+ There is no account system or application database. Uploads are processed within the active Space container. Temporary job directories are deleted after processing, although platform infrastructure and logs remain subject to Hugging Face's own policies.
53
+ Limitations
54
+ Exact visual reconstruction of translated PDF and DOCX layouts is not included.
55
+ Roman Urdu and Hinglish spelling is non-standard, so contextual quality varies in free local mode.
56
+ Local model downloads may make the first request slower.
57
+ Free Spaces may sleep when inactive and have limited memory or compute.