Spaces:
Sleeping
Sleeping
use the v8 of model
Browse files
app.py
CHANGED
|
@@ -11,7 +11,7 @@ device = "cpu"
|
|
| 11 |
print("Loading Whisper STT Model...")
|
| 12 |
whisper_model = whisper.load_model("small", device=device)
|
| 13 |
|
| 14 |
-
model_path = "Akariieieie/
|
| 15 |
print(f"Loading custom NLLB model from {model_path}...")
|
| 16 |
tokenizer = AutoTokenizer.from_pretrained(model_path)
|
| 17 |
model = AutoModelForSeq2SeqLM.from_pretrained(model_path).to(device)
|
|
@@ -91,9 +91,7 @@ def universal_translator(text, audio_path, source_lang_name, target_lang_name):
|
|
| 91 |
|
| 92 |
# 3. Gradio Interface Layout
|
| 93 |
with gr.Blocks(theme=gr.themes.Base()) as demo:
|
| 94 |
-
gr.Markdown("
|
| 95 |
-
gr.Markdown("This space functions as both a web UI and an active API endpoint for multi-way voice/text translation.")
|
| 96 |
-
|
| 97 |
with gr.Row():
|
| 98 |
with gr.Column():
|
| 99 |
audio_in = gr.Audio(label="Audio Input (File or Mic)", type="filepath")
|
|
|
|
| 11 |
print("Loading Whisper STT Model...")
|
| 12 |
whisper_model = whisper.load_model("small", device=device)
|
| 13 |
|
| 14 |
+
model_path = "Akariieieie/fine_tuned_dialectgov8"
|
| 15 |
print(f"Loading custom NLLB model from {model_path}...")
|
| 16 |
tokenizer = AutoTokenizer.from_pretrained(model_path)
|
| 17 |
model = AutoModelForSeq2SeqLM.from_pretrained(model_path).to(device)
|
|
|
|
| 91 |
|
| 92 |
# 3. Gradio Interface Layout
|
| 93 |
with gr.Blocks(theme=gr.themes.Base()) as demo:
|
| 94 |
+
gr.Markdown("DialectGo Unified Translation System")
|
|
|
|
|
|
|
| 95 |
with gr.Row():
|
| 96 |
with gr.Column():
|
| 97 |
audio_in = gr.Audio(label="Audio Input (File or Mic)", type="filepath")
|