chiraggupta8769 commited on
Commit
4c3594b
·
verified ·
1 Parent(s): 5529cae

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -1,10 +1,9 @@
1
  import gradio as gr
2
- import torch
3
  from transformers import pipeline
4
- import os
5
  import subprocess
 
6
 
7
- # === SCRIPT GENERATOR ===
8
  generator = pipeline("text-generation", model="gpt2")
9
 
10
  def generate_script(prompt):
@@ -46,11 +45,11 @@ with gr.Blocks() as demo:
46
  gr.Markdown("Enter a scene below to generate video + voice using AI.")
47
 
48
  with gr.Row():
49
- input_prompt = gr.Textbox(label="🎤 Your Scene Prompt", placeholder="e.g. Temple in the Himalayas")
50
  generate_btn = gr.Button("🎞️ Generate")
51
 
52
  output_video = gr.Video(label="AI Generated Video")
53
- output_script = gr.Textbox(label="Script")
54
 
55
  generate_btn.click(fn=full_pipeline, inputs=input_prompt, outputs=[output_video, output_script])
56
 
 
1
  import gradio as gr
 
2
  from transformers import pipeline
 
3
  import subprocess
4
+ import os
5
 
6
+ # === TEXT SCRIPT GENERATOR ===
7
  generator = pipeline("text-generation", model="gpt2")
8
 
9
  def generate_script(prompt):
 
45
  gr.Markdown("Enter a scene below to generate video + voice using AI.")
46
 
47
  with gr.Row():
48
+ input_prompt = gr.Textbox(label="🎤 Your Scene Prompt", placeholder="e.g. A glowing temple in the rain")
49
  generate_btn = gr.Button("🎞️ Generate")
50
 
51
  output_video = gr.Video(label="AI Generated Video")
52
+ output_script = gr.Textbox(label="Generated Script")
53
 
54
  generate_btn.click(fn=full_pipeline, inputs=input_prompt, outputs=[output_video, output_script])
55