manthilaffs commited on
Commit
8ae799f
·
verified ·
1 Parent(s): 9ad878b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -8
app.py CHANGED
@@ -55,14 +55,14 @@ h1, h2, h3, h4, h5 {text-align:center;}
55
  #title-bar {background:linear-gradient(90deg,#804dee,#ee82ee);color:white;padding:0.6rem;border-radius:1rem;margin-bottom:0.6rem;}
56
  textarea, input {font-family:'Noto Sans Sinhala',sans-serif;}
57
  """, theme=gr.themes.Soft()) as demo:
58
- gr.HTML("<div id='title-bar'><h1>🧠 Gamunu 4B Instruct Alpha</h1><h4>Sinhala Instruct LLM</h4></div>")
59
  # gr.Markdown("⚙️ **Pure Transformers Inference** | 💠 ZeroGPU GPU Burst")
60
 
61
  with gr.Row(equal_height=True):
62
  with gr.Column(scale=1, min_width=350):
63
  instruction = gr.Textbox(
64
  label="🧾 Instruction / Question",
65
- placeholder="උදා: ඊයේ රු. 30 ඇපල් ගෙඩියක් අද රු. 60 නම් මිල වෙනස කීයද?",
66
  lines=4,
67
  )
68
  input_text = gr.Textbox(
@@ -75,7 +75,7 @@ textarea, input {font-family:'Noto Sans Sinhala',sans-serif;}
75
  output = gr.Markdown(label="🧩 Gamunu Response", elem_id="output-box")
76
 
77
  # Example categories
78
- with gr.Accordion("🧮 Example Prompts by Category", open=False):
79
  with gr.Tab("Maths"):
80
  gr.Examples(
81
  examples=[
@@ -87,7 +87,7 @@ textarea, input {font-family:'Noto Sans Sinhala',sans-serif;}
87
  with gr.Tab("Roleplay"):
88
  gr.Examples(
89
  examples=[
90
- ["ඔබ ගුරුවරයෙකු ලෙස ක්‍රියාකරන්න. ශිෂ්‍යයාට ගණිතය උගන්වන්න.", ""],
91
  ["ඔබ පරිසර විද්‍යාඥයෙකු ලෙස වායු මණ්ඩලය පැහැදිලි කරන්න.", ""],
92
  ],
93
  inputs=[instruction],
@@ -95,8 +95,10 @@ textarea, input {font-family:'Noto Sans Sinhala',sans-serif;}
95
  with gr.Tab("QA"):
96
  gr.Examples(
97
  examples=[
98
- ["ශ්‍රී ලංකාවේ මුල්ම අගමැති කවුද?", ""],
99
- ["ඉන්දියානු මහා සමුද්‍රය යනු කොහෙද?", ""],
 
 
100
  ],
101
  inputs=[instruction],
102
  )
@@ -113,8 +115,7 @@ textarea, input {font-family:'Noto Sans Sinhala',sans-serif;}
113
 
114
  gr.Markdown("""
115
  ---
116
- 🪶 **Model:** `manthilaffs/Gamunu-4B-Instruct-Alpha`
117
- 🧰 **Stack:** Transformers + Torch + Gradio + ZeroGPU
118
  © 2025 Gamunu Project | Experimental Release
119
  """)
120
 
 
55
  #title-bar {background:linear-gradient(90deg,#804dee,#ee82ee);color:white;padding:0.6rem;border-radius:1rem;margin-bottom:0.6rem;}
56
  textarea, input {font-family:'Noto Sans Sinhala',sans-serif;}
57
  """, theme=gr.themes.Soft()) as demo:
58
+ gr.HTML("<div id='title-bar'><h1>🧠 Gamunu 4B Instruct Alpha</h1><h4>සිංහල Instruct LLM</h4></div>")
59
  # gr.Markdown("⚙️ **Pure Transformers Inference** | 💠 ZeroGPU GPU Burst")
60
 
61
  with gr.Row(equal_height=True):
62
  with gr.Column(scale=1, min_width=350):
63
  instruction = gr.Textbox(
64
  label="🧾 Instruction / Question",
65
+ placeholder="උදා: හායි! මම සමන්. ඔයාට කොහොමද?",
66
  lines=4,
67
  )
68
  input_text = gr.Textbox(
 
75
  output = gr.Markdown(label="🧩 Gamunu Response", elem_id="output-box")
76
 
77
  # Example categories
78
+ with gr.Accordion("🧮 Example Prompts by Category", open=True):
79
  with gr.Tab("Maths"):
80
  gr.Examples(
81
  examples=[
 
87
  with gr.Tab("Roleplay"):
88
  gr.Examples(
89
  examples=[
90
+ ["ඔබ ගුරුවරයෙකු ලෙස ක්‍රියාකරන්න. ශිෂ්‍යයාට ගණිතය උගන්වන්න.", "රු. 30 කින් මිලදී ගත් දේ රු. 60 නම් මිල වෙනස ප්‍රතිශතයකින් කීයද?"],
91
  ["ඔබ පරිසර විද්‍යාඥයෙකු ලෙස වායු මණ්ඩලය පැහැදිලි කරන්න.", ""],
92
  ],
93
  inputs=[instruction],
 
95
  with gr.Tab("QA"):
96
  gr.Examples(
97
  examples=[
98
+ ["ෆොටෝසින්තසිස් ක්‍රියාවලිය පැහැදිලි කරන්න.", ""],
99
+ ["ජලයේ රසායනික සූත්‍රය කුමක්ද?", ""],
100
+ ["""ජලය සහ සනීපාරක්ෂාව පිළිබඳ සංකල්පය,
101
+ i. SMART ii. PRICES iii. WASH""", ""]
102
  ],
103
  inputs=[instruction],
104
  )
 
115
 
116
  gr.Markdown("""
117
  ---
118
+ 🪶 **Model:** `manthilaffs/Gamunu-4B-Instruct-Alpha`
 
119
  © 2025 Gamunu Project | Experimental Release
120
  """)
121