Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
11unx0 authored Jun 4, 2024
1 parent a9567ec commit 01a1b49
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## author: 11unx0 (https://github.com/11unx0)
## project: https://github.com/11unx0/Transcriptor

import argparse
import whisper
from pytube import YouTube
Expand Down Expand Up @@ -41,15 +44,15 @@ def transcribe(input_data, file_data=None):
else:
return "Please enter a YouTube URL or upload an audio file."

input_text_url = gr.inputs.Textbox(label='YouTube URL', placeholder='Enter YouTube video URL or upload audio file')
input_file = gr.inputs.File(label="Upload Audio File")
input_text_url = gr.Textbox(label='YouTube URL', placeholder='Enter YouTube video URL or upload audio file')
input_file = gr.File(label="Upload Audio File")

iface = gr.Interface(
fn=transcribe,
inputs=[input_text_url, input_file], # Both input types
outputs="text",
title="11unx0's Transcriptor. Uses Whisper models by OpenAI.",
description="Enter a YouTube video URL or upload an audio file to transcribe it.",
title="11unx0's Transcriptor.",
description="Enter a YouTube video URL or upload an audio file to transcribe it.\n Uses Whisper models by OpenAI.",
)

iface.launch()

0 comments on commit 01a1b49

Please sign in to comment.