knowquestionsjnkjhiu9877 commited on
Commit
11e765b
·
verified ·
1 Parent(s): aeafef1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -2
app.py CHANGED
@@ -6,8 +6,16 @@ GET_KEY_URL = "https://adrinolinks.com/cTjV"
6
 
7
  # ---------------- LOGIC ----------------
8
  def generate_video(prompt, key):
9
- time.sleep(1.5) # simulate processing
10
- # ALWAYS INVALID KEY
 
 
 
 
 
 
 
 
11
  return None, "❌ Invalid API Key. Please get a valid key to generate."
12
 
13
  # ---------------- UI ----------------
 
6
 
7
  # ---------------- LOGIC ----------------
8
  def generate_video(prompt, key):
9
+ time.sleep(1.2) # simulate processing
10
+
11
+ if not prompt.strip() and not key.strip():
12
+ return None, "❌ Prompt can't be empty and API key is required."
13
+ if not prompt.strip():
14
+ return None, "❌ Prompt can't be empty."
15
+ if not key.strip():
16
+ return None, "❌ Please enter your API key."
17
+
18
+ # Both filled → always invalid key
19
  return None, "❌ Invalid API Key. Please get a valid key to generate."
20
 
21
  # ---------------- UI ----------------