GLAkavya commited on
Commit
d7ea9fb
Β·
verified Β·
1 Parent(s): b7e8ee0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -14
app.py CHANGED
@@ -260,7 +260,8 @@ def bot_reply(user_msg, history):
260
  "β€’ `styles` β€” Premium/Energetic/Fun")
261
 
262
  history = history or []
263
- history.append([user_msg, reply])
 
264
  return history, ""
265
 
266
  # ══════════════════════════════════════════════════════════════════
@@ -567,17 +568,8 @@ def generate(images, caption, style, language, duration, add_aud, add_cap, progr
567
  # ══════════════════════════════════════════════════════════════════
568
  # UI
569
  # ══════════════════════════════════════════════════════════════════
570
- css = """
571
- #title{text-align:center;font-size:2.3rem;font-weight:900;background:linear-gradient(135deg,#a855f7,#ec4899);-webkit-background-clip:text;-webkit-text-fill-color:transparent}
572
- #sub{text-align:center;color:#aaa;margin-bottom:1.2rem;font-size:1rem}
573
- .insight{font-family:monospace;font-size:.86rem;line-height:1.75}
574
- .bot-container{border:1px solid #3a3a5c;border-radius:12px;padding:0;overflow:hidden}
575
- .save-row{gap:8px}
576
- .feature-badge{display:inline-block;background:linear-gradient(135deg,#7c3aed,#db2777);color:white;padding:2px 10px;border-radius:99px;font-size:.75rem;margin:2px}
577
- .tab-label{font-weight:700}
578
- """
579
-
580
- with gr.Blocks(css=css) as demo:
581
  gr.Markdown("# 🎬 AI Reel Generator", elem_id="title")
582
  gr.Markdown(
583
  "Upload 1-5 images β†’ AI auto-detects category β†’ cinematic reel + smart posting strategy\n\n"
@@ -682,7 +674,8 @@ with gr.Blocks(css=css) as demo:
682
  bot_chatbox = gr.Chatbot(
683
  label="πŸ’¬ Chat with ReelBot",
684
  height=420,
685
- value=[[None, WELCOME_MSG]],
 
686
  )
687
 
688
  with gr.Row():
@@ -811,4 +804,4 @@ with gr.Blocks(css=css) as demo:
811
  )
812
 
813
  if __name__ == "__main__":
814
- demo.launch(theme=gr.themes.Soft(primary_hue="violet"))
 
260
  "β€’ `styles` β€” Premium/Energetic/Fun")
261
 
262
  history = history or []
263
+ history.append({"role": "user", "content": user_msg})
264
+ history.append({"role": "assistant", "content": reply})
265
  return history, ""
266
 
267
  # ══════════════════════════════════════════════════════════════════
 
568
  # ══════════════════════════════════════════════════════════════════
569
  # UI
570
  # ══════════════════════════════════════════════════════════════════
571
+
572
+ with gr.Blocks() as demo:
 
 
 
 
 
 
 
 
 
573
  gr.Markdown("# 🎬 AI Reel Generator", elem_id="title")
574
  gr.Markdown(
575
  "Upload 1-5 images β†’ AI auto-detects category β†’ cinematic reel + smart posting strategy\n\n"
 
674
  bot_chatbox = gr.Chatbot(
675
  label="πŸ’¬ Chat with ReelBot",
676
  height=420,
677
+ type="messages",
678
+ value=[{"role": "assistant", "content": WELCOME_MSG}],
679
  )
680
 
681
  with gr.Row():
 
804
  )
805
 
806
  if __name__ == "__main__":
807
+ demo.launch()