|
import streamlit as st |
|
from transformers import pipeline |
|
|
|
|
|
transcribe = pipeline(model="openai/whisper-large-v2") |
|
|
|
|
|
st.title("Transcription Service") |
|
st.write("Upload a YouTube URL or an audio file to transcribe.") |
|
|
|
|
|
url = st.text_input("Enter YouTube URL:") |
|
audio_file = st.file_uploader("Or upload an audio file (mp3, wav):") |
|
|
|
if url: |
|
|
|
|
|
st.write("Transcribing from YouTube URL...") |
|
|
|
|
|
|
|
st.write("YouTube URL transcription is not implemented yet.") |
|
elif audio_file: |
|
|
|
st.write("Transcribing from uploaded audio file...") |
|
transcription = transcribe(audio_file.getvalue()) |
|
st.write(transcription) |
|
|
|
st.write("Thank you for using our service!") |
|
|
|
|