Update app.py
Browse files21 unmodified lines22232425262728293031323321 unmodified lines# Load the Whisper model and processorwhisper_model_name = "openai/whisper-small"whisper_processor = WhisperProcessor.from_pretrained(whisper_model_name)whisper_model = WhisperForConditionalGeneration.from_pretrained(whisper_model_name).to(device)# Load the Qwen model and tokenizerqwen_model_name = "Qwen/Qwen2.5-3B-Instruct"qwen_tokenizer = AutoTokenizer.from_pretrained(qwen_model_name)qwen_model = AutoModelForCausalLM.from_pretrained(qwen_model_name).to(device)def download_audio_from_url(url):try:21 unmodified lines22232425262728293031323321 unmodified lines# Load the Whisper model and processorwhisper_model_name = "openai/whisper-small"whisper_processor = WhisperProcessor.from_pretrained(whisper_model_name)whisper_model = WhisperForConditionalGeneration.from_pretrained(whisper_model_name, torch_dtype=torch.float16).to(device)# Load the Qwen model and tokenizerqwen_model_name = "Qwen/Qwen2.5-3B-Instruct"qwen_tokenizer = AutoTokenizer.from_pretrained(qwen_model_name)qwen_model = AutoModelForCausalLM.from_pretrained(qwen_model_name, torch_dtype=torch.float16).to(device)def download_audio_from_url(url):try:
app.py+2-2