oddadmix commited on
Commit
20554b7
·
verified ·
1 Parent(s): 11d2289

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -13,11 +13,11 @@ def load_model():
13
  global model, processor
14
 
15
  print("Loading model...")
16
- model_id = "google/gemma-3n-e4b-it"
17
 
18
 
19
  model = Gemma3nForConditionalGeneration.from_pretrained(
20
- "oddadmix/gemma-4b-egyptian-code-switching-b4-g2-merged",
21
  device_map="auto",
22
  torch_dtype=torch.bfloat16,
23
  ).eval()
@@ -85,13 +85,13 @@ def transcribe_audio(audio_path, max_tokens=128):
85
  load_model()
86
 
87
  # Create Gradio interface
88
- with gr.Blocks(title="Gemma 3n Audio Transcription") as demo:
89
  gr.Markdown(
90
  """
91
- # 🎙️ Gemma 3n Audio Transcription
92
 
93
  Upload an audio file or record your voice to get an automatic transcription.
94
- Powered by Google's Gemma 3n-E4B-IT multimodal model.
95
  """
96
  )
97
 
@@ -123,7 +123,7 @@ with gr.Blocks(title="Gemma 3n Audio Transcription") as demo:
123
  """
124
  ### Tips:
125
  - For best results, use clear audio with minimal background noise
126
- - The model can handle various languages and accents
127
  - Recording length should be reasonable (under 30 seconds recommended)
128
  """
129
  )
 
13
  global model, processor
14
 
15
  print("Loading model...")
16
+ model_id = "oddadmix/gemma-4b-egyptian-code-switching-b4-g2-merged"
17
 
18
 
19
  model = Gemma3nForConditionalGeneration.from_pretrained(
20
+ model_id,
21
  device_map="auto",
22
  torch_dtype=torch.bfloat16,
23
  ).eval()
 
85
  load_model()
86
 
87
  # Create Gradio interface
88
+ with gr.Blocks(title="Egyptian Code Switching Audio Transcription") as demo:
89
  gr.Markdown(
90
  """
91
+ # 🎙️ Egyptian Code Switching Audio Transcription
92
 
93
  Upload an audio file or record your voice to get an automatic transcription.
94
+ Specialized for Egyptian Arabic with English code-switching.
95
  """
96
  )
97
 
 
123
  """
124
  ### Tips:
125
  - For best results, use clear audio with minimal background noise
126
+ - The model specializes in Egyptian Arabic with English code-switching
127
  - Recording length should be reasonable (under 30 seconds recommended)
128
  """
129
  )