waloneai commited on
Commit
252396a
·
verified ·
1 Parent(s): 8633600

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -52,7 +52,7 @@ async def generate_video(api_key, prompt, loop=False, aspect_ratio="16:9", progr
52
 
53
  async def text_to_video(api_key, prompt, loop, aspect_ratio, progress=gr.Progress()):
54
  if not api_key:
55
- raise gr.Error("Please enter your Luma AI API key.")
56
 
57
  try:
58
  video_path = await generate_video(api_key, prompt, loop, aspect_ratio, progress)
@@ -62,7 +62,7 @@ async def text_to_video(api_key, prompt, loop, aspect_ratio, progress=gr.Progres
62
 
63
  async def image_to_video(api_key, prompt, image_url, loop, aspect_ratio, progress=gr.Progress()):
64
  if not api_key:
65
- raise gr.Error("Please enter your Luma AI API key.")
66
 
67
  try:
68
  client = AsyncLumaAI(auth_token=api_key)
@@ -119,9 +119,9 @@ async def image_to_video(api_key, prompt, image_url, loop, aspect_ratio, progres
119
  return None, f"An error occurred: {str(e)}"
120
 
121
  with gr.Blocks() as demo:
122
- gr.Markdown("# Luma AI Text-to-Video Demo")
123
 
124
- api_key = gr.Textbox(label="Luma AI API Key", type="password")
125
 
126
  with gr.Tab("Text to Video"):
127
  prompt = gr.Textbox(label="Prompt")
 
52
 
53
  async def text_to_video(api_key, prompt, loop, aspect_ratio, progress=gr.Progress()):
54
  if not api_key:
55
+ raise gr.Error("Please enter your Video Machine Pro key.")
56
 
57
  try:
58
  video_path = await generate_video(api_key, prompt, loop, aspect_ratio, progress)
 
62
 
63
  async def image_to_video(api_key, prompt, image_url, loop, aspect_ratio, progress=gr.Progress()):
64
  if not api_key:
65
+ raise gr.Error("Please enter your Video Machine Pro key.")
66
 
67
  try:
68
  client = AsyncLumaAI(auth_token=api_key)
 
119
  return None, f"An error occurred: {str(e)}"
120
 
121
  with gr.Blocks() as demo:
122
+ gr.Markdown("# Video Machine Pro AI Text-to-Video Demo")
123
 
124
+ api_key = gr.Textbox(label="Video Machine Pro Key", type="password")
125
 
126
  with gr.Tab("Text to Video"):
127
  prompt = gr.Textbox(label="Prompt")