KalanaPabasara commited on
Commit
6c6f88b
Β·
1 Parent(s): 1fed70a

Add HF Spaces README and Streamlit config

Browse files
Files changed (2) hide show
  1. .streamlit/config.toml +11 -0
  2. README.md +67 -0
.streamlit/config.toml ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [theme]
2
+ primaryColor = "#FF4B4B"
3
+ backgroundColor = "#FFFFFF"
4
+ secondaryBackgroundColor = "#F0F2F6"
5
+ textColor = "#262730"
6
+ font = "sans serif"
7
+
8
+ [server]
9
+ headless = true
10
+ enableCORS = false
11
+ enableXsrfProtection = true
README.md ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ title: SinCode
3
+ emoji: πŸ‡±πŸ‡°
4
+ colorFrom: blue
5
+ colorTo: yellow
6
+ sdk: streamlit
7
+ sdk_version: 1.32.0
8
+ app_file: app.py
9
+ pinned: false
10
+ license: mit
11
+ ---
12
+
13
+ # ΰ·ƒΰ·’ΰΆ‚Code β€” Singlish to Sinhala Transliterator
14
+
15
+ A model-driven, context-aware back-transliteration system that converts Romanised Sinhala (Singlish) to native Sinhala script.
16
+
17
+ ## Architecture (v3)
18
+
19
+ ```
20
+ Input sentence
21
+ β”‚
22
+ β–Ό
23
+ Word Tokenizer
24
+ β”‚
25
+ β”œβ”€ Sinhala script? ──────────────────────► Pass through unchanged
26
+ β”‚
27
+ β”œβ”€ English vocab (len β‰₯ 3)? ─────────────► Pass through unchanged
28
+ β”‚
29
+ └─ Singlish word?
30
+ β”‚
31
+ β–Ό
32
+ ByT5-small seq2seq
33
+ (top-5 candidates)
34
+ β”‚
35
+ β–Ό
36
+ XLM-RoBERTa MLM reranker
37
+ (contextual scoring)
38
+ β”‚
39
+ β–Ό
40
+ Best candidate
41
+ ```
42
+
43
+ ## Models
44
+
45
+ | Model | Role | Hub ID |
46
+ |-------|------|--------|
47
+ | ByT5-small | Singlish β†’ Sinhala candidate generation | `Kalana001/byt5-small-singlish-sinhala` |
48
+ | XLM-RoBERTa | Contextual MLM reranking | `Kalana001/xlm-roberta-base-finetuned-sinhala` |
49
+ | mBart50 | Full-sentence Sinhala output mode | `Kalana001/mbart50-large-singlish-sinhala` |
50
+
51
+ ## Modes
52
+
53
+ - **Code-Mixed Output** β€” Retains English words where contextually appropriate; Singlish words are transliterated using ByT5 + XLM-RoBERTa reranking.
54
+ - **Full Sinhala Output** β€” Transliterates the entire sentence to Sinhala script using mBart50.
55
+
56
+ ## Environment Variables (optional)
57
+
58
+ Set these in HF Spaces β†’ Settings β†’ Repository secrets to enable Supabase feedback storage:
59
+
60
+ | Variable | Description |
61
+ |----------|-------------|
62
+ | `SUPABASE_URL` | Supabase project URL |
63
+ | `SUPABASE_ANON_KEY` | Supabase anon key |
64
+ | `SUPABASE_SERVICE_ROLE_KEY` | Supabase service role key |
65
+ | `SUPABASE_FEEDBACK_TABLE` | Table name (default: `feedback_submissions`) |
66
+
67
+ If not set, feedback is saved locally to `misc/feedback_submissions.jsonl`.