Spaces:
Paused
Paused
| import gradio as gr | |
| from extractor import process_video, RESOLUTIONS | |
| with gr.Blocks() as demo: | |
| gr.Markdown(""" | |
| # π¬ Vid-Take PRO | |
| π¨ **Access Required:** | |
| π [**Get Access Here**](https://franciscoel.gumroad.com/l/hpgcv) | |
| *(Instant password delivery after verification)* | |
| π§ Contact: Francisnoel4@gmail.com | |
| --- | |
| βοΈ **Legal Notice:** | |
| This tool is for educational, personal, and parody use only. | |
| Commercial use of extracted frames is prohibited unless it complies with [U.S. Fair Use Law](https://www.law.cornell.edu/uscode/text/17/107). | |
| """) | |
| password = gr.Textbox(label="Enter Access Password", type="password") | |
| status = gr.Textbox(label="Access Status", interactive=False) | |
| with gr.Column(visible=False) as tool_ui: | |
| with gr.Row(): | |
| video_input = gr.File(label="Upload Video File", file_types=[".mp4", ".mov", ".webm"]) | |
| fps_input = gr.Number(value=1, label="Frames Per Second (FPS)") | |
| resolution_input = gr.Dropdown(choices=list(RESOLUTIONS.keys()), value="Original", label="Export Resolution") | |
| with gr.Row(): | |
| extract_button = gr.Button("Extract Frames & Download") | |
| output_file = gr.File(label="Download .zip of Frames") | |
| extract_button.click( | |
| fn=process_video, | |
| inputs=[video_input, fps_input, resolution_input], | |
| outputs=output_file | |
| ) | |
| def check_pw(pw): | |
| if pw == "frame123": | |
| return "β Access Granted", gr.update(visible=True) | |
| else: | |
| return "β Incorrect Password", gr.update(visible=False) | |
| unlock_button = gr.Button("Unlock Tool") | |
| unlock_button.click(fn=check_pw, inputs=password, outputs=[status, tool_ui]) | |
| if __name__ == "__main__": | |
| demo.launch() |