0% found this document useful (0 votes)
4 views1 page

Subtitle Py

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views1 page

Subtitle Py

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

import tkinter as tk

from tkinter import filedialog, messagebox

def upload_file():
file_path = filedialog.askopenfilename()
if file_path:
file_label.config(text=file_path)

def generate_subtitles():
# Here, you would implement your subtitle generation logic
# For now, just show a placeholder message
messagebox.showinfo("Info", "Subtitle generation functionality to be
implemented.")

# Set up the main application window


app = tk.Tk()
app.title("Subtitle Generator")
app.geometry("400x200")

# Create and place widgets


file_label = tk.Label(app, text="No file selected", wraplength=300)
file_label.pack(pady=20)

upload_button = tk.Button(app, text="Upload Audio/Video File", command=upload_file)


upload_button.pack(pady=10)

generate_button = tk.Button(app, text="Generate Subtitles",


command=generate_subtitles)
generate_button.pack(pady=10)

# Start the Tkinter event loop


app.mainloop()

You might also like