rbcurzon commited on
Commit
83733e7
·
verified ·
1 Parent(s): f79d643

Update app.py

Browse files

Change model that can understand transcribe Filipino and Cebuano

Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -13,7 +13,7 @@ from transformers import WhisperProcessor, WhisperForConditionalGeneration, pipe
13
  device = "cuda:0" if torch.cuda.is_available() else "cpu"
14
 
15
  # load model and processor
16
- model_id = "rbcurzon/whisper-small-ceb"
17
  pipe = pipeline("automatic-speech-recognition", model=model_id, device=device)
18
 
19
  """**FastAPI**"""
@@ -29,7 +29,7 @@ from google.genai import types
29
  client = genai.Client(api_key=os.environ.get("GENAI_API_KEY")) # Do not share api key
30
 
31
  def translate(text, srcLang, tgtLang):
32
- sys_instruct = "You are a professional translator. Return nothing but the translation only."
33
  response = client.models.generate_content(
34
  model="gemini-2.0-flash",
35
  config=types.GenerateContentConfig(
 
13
  device = "cuda:0" if torch.cuda.is_available() else "cpu"
14
 
15
  # load model and processor
16
+ model_id = "rbcurzon/whisper-small-fil"
17
  pipe = pipeline("automatic-speech-recognition", model=model_id, device=device)
18
 
19
  """**FastAPI**"""
 
29
  client = genai.Client(api_key=os.environ.get("GENAI_API_KEY")) # Do not share api key
30
 
31
  def translate(text, srcLang, tgtLang):
32
+ sys_instruct = "You are a professional translator. Do not give explanation."
33
  response = client.models.generate_content(
34
  model="gemini-2.0-flash",
35
  config=types.GenerateContentConfig(