Spaces:
Sleeping
Sleeping
Muhammad Abdullah commited on
Update app.py
Browse files292 unmodified lines293294295296297298299300292 unmodified linesdef load_model(language='en', summarizer_type='bart'):device = torch.device("cuda" if torch.cuda.is_available() else "cpu")if language == 'ur':processor = AutoProcessor.from_pretrained("GogetaBlueMUI/whisper-medium-ur-fleurs")model = AutoModelForSpeechSeq2Seq.from_pretrained("GogetaBlueMUI/whisper-medium-ur-fleurs").to(device)else:processor = AutoProcessor.from_pretrained("openai/whisper-small")model = AutoModelForSpeechSeq2Seq.from_pretrained("openai/whisper-small").to(device)292 unmodified lines293294295296297298299300292 unmodified linesdef load_model(language='en', summarizer_type='bart'):device = torch.device("cuda" if torch.cuda.is_available() else "cpu")if language == 'ur':processor = AutoProcessor.from_pretrained("GogetaBlueMUI/whisper-medium-ur-fleurs-v2")model = AutoModelForSpeechSeq2Seq.from_pretrained("GogetaBlueMUI/whisper-medium-ur-fleurs-v2").to(device)else:processor = AutoProcessor.from_pretrained("openai/whisper-small")model = AutoModelForSpeechSeq2Seq.from_pretrained("openai/whisper-small").to(device)
app.py+2-2