Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,13 +7,13 @@ from transformers import WhisperForConditionalGeneration, WhisperProcessor
|
|
| 7 |
app = FastAPI()
|
| 8 |
# Device configuration
|
| 9 |
# Load the model and processor
|
| 10 |
-
model_id = "
|
| 11 |
model = WhisperForConditionalGeneration.from_pretrained(
|
| 12 |
model_id
|
| 13 |
)
|
| 14 |
import torch
|
| 15 |
|
| 16 |
-
processor = WhisperProcessor.from_pretrained('
|
| 17 |
model.config.forced_decoder_ids = None
|
| 18 |
forced_decoder_ids = processor.get_decoder_prompt_ids(language="Arabic", task="transcribe")
|
| 19 |
model.generation_config.cache_implementation = "static"
|
|
|
|
| 7 |
app = FastAPI()
|
| 8 |
# Device configuration
|
| 9 |
# Load the model and processor
|
| 10 |
+
model_id = "WajeehAzeemX/whisper-smal-ar-testing-kale-5000"
|
| 11 |
model = WhisperForConditionalGeneration.from_pretrained(
|
| 12 |
model_id
|
| 13 |
)
|
| 14 |
import torch
|
| 15 |
|
| 16 |
+
processor = WhisperProcessor.from_pretrained('WajeehAzeemX/whisper-smal-ar-testing-kale-5000')
|
| 17 |
model.config.forced_decoder_ids = None
|
| 18 |
forced_decoder_ids = processor.get_decoder_prompt_ids(language="Arabic", task="transcribe")
|
| 19 |
model.generation_config.cache_implementation = "static"
|