Adityahulk commited on
Commit
80c44a9
Β·
1 Parent(s): c648277

text changes

Browse files
Files changed (1) hide show
  1. streamlit_app.py +112 -20
streamlit_app.py CHANGED
@@ -562,30 +562,105 @@ def generate_via_api(api_url: str, input_type: str, input_data: str, quality: st
562
  # ============================================================================
563
 
564
  with st.sidebar:
565
- st.title("🎬 Vidsimplify")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
566
  st.markdown("---")
567
 
568
  # Show mode indicator
569
  if DIRECT_MODE:
570
- st.success("πŸš€ Direct Mode (Hugging Face)")
571
  else:
572
- st.info("πŸ”Œ API Mode")
573
  api_url = st.text_input("API URL", value="http://localhost:8000")
574
 
575
- st.markdown("### Settings")
576
- quality = st.selectbox("Quality", ["low", "medium", "high"], index=1)
577
- category = st.selectbox("Category", ["tech_system", "product_startup", "mathematical"], index=0)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
578
 
579
  st.markdown("---")
580
- st.markdown("### About")
581
- st.info("Generate educational animation videos from text, blogs, or PDFs using Manim and AI.")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
582
 
583
  # ============================================================================
584
  # Main Content
585
  # ============================================================================
586
 
587
- st.title("AI Video Generator")
588
- st.markdown("Turn your content into engaging animations in minutes.")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
589
 
590
  # Input tabs
591
  tab1, tab2, tab3 = st.tabs(["πŸ“ Text / Script", "πŸ”— Blog / URL", "πŸ“„ PDF Document"])
@@ -624,7 +699,10 @@ with tab3:
624
  # Generate Button & Logic
625
  # ============================================================================
626
 
627
- if st.button("Generate Video", type="primary", use_container_width=True):
 
 
 
628
  if not input_data:
629
  st.error("Please provide input data.")
630
  else:
@@ -708,12 +786,26 @@ if st.button("Generate Video", type="primary", use_container_width=True):
708
  # Footer
709
  # ============================================================================
710
 
711
- st.markdown("---")
712
- col1, col2, col3 = st.columns(3)
713
- with col1:
714
- st.markdown("Built with ❀️ using Streamlit")
715
- with col2:
716
- st.markdown("Powered by Manim & AI")
717
- with col3:
718
- mode_text = "Direct Mode" if DIRECT_MODE else "API Mode"
719
- st.markdown(f"Running in: **{mode_text}**")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
562
  # ============================================================================
563
 
564
  with st.sidebar:
565
+ # Logo and branding
566
+ st.markdown("""
567
+ <div style="text-align: center; padding: 1rem 0;">
568
+ <h1 style="
569
+ background: linear-gradient(135deg, #818cf8 0%, #c084fc 50%, #f472b6 100%);
570
+ -webkit-background-clip: text;
571
+ -webkit-text-fill-color: transparent;
572
+ background-clip: text;
573
+ font-size: 2rem;
574
+ font-weight: 800;
575
+ margin: 0;
576
+ ">✨ Vidsimplify</h1>
577
+ <p style="color: #a5b4fc; font-size: 0.85rem; margin-top: 0.5rem;">
578
+ Precision Animations
579
+ </p>
580
+ </div>
581
+ """, unsafe_allow_html=True)
582
+
583
  st.markdown("---")
584
 
585
  # Show mode indicator
586
  if DIRECT_MODE:
587
+ st.success("πŸš€ Cloud Mode")
588
  else:
589
+ st.info("πŸ”Œ Local Development")
590
  api_url = st.text_input("API URL", value="http://localhost:8000")
591
 
592
+ st.markdown("### βš™οΈ Settings")
593
+
594
+ # Quality - default to HIGH (index=2)
595
+ quality = st.selectbox(
596
+ "Video Quality",
597
+ ["low", "medium", "high"],
598
+ index=2, # Default to HIGH
599
+ format_func=lambda x: {"low": "⚑ Fast (480p)", "medium": "πŸŽ₯ Standard (720p)", "high": "✨ Premium (1080p)"}[x]
600
+ )
601
+
602
+ # Category with better labels
603
+ category = st.selectbox(
604
+ "Animation Style",
605
+ ["tech_system", "product_startup", "mathematical"],
606
+ index=0,
607
+ format_func=lambda x: {"tech_system": "πŸ”§ Tech & Systems", "product_startup": "πŸš€ Product & Startup", "mathematical": "πŸ“ Mathematical"}[x]
608
+ )
609
 
610
  st.markdown("---")
611
+
612
+ # About section - professional branding
613
+ st.markdown("""
614
+ <div style="
615
+ background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
616
+ border: 1px solid rgba(99, 102, 241, 0.2);
617
+ border-radius: 12px;
618
+ padding: 1rem;
619
+ margin-top: 1rem;
620
+ ">
621
+ <h4 style="color: #e0e0ff; margin: 0 0 0.5rem 0; font-size: 0.9rem;">About Vidsimplify</h4>
622
+ <p style="color: #a5b4fc; font-size: 0.8rem; margin: 0; line-height: 1.5;">
623
+ Transform your idea into precision animation.
624
+ </p>
625
+ </div>
626
+ """, unsafe_allow_html=True)
627
+
628
+ # Footer in sidebar
629
+ st.markdown("""
630
+ <div style="
631
+ position: absolute;
632
+ bottom: 6rem;
633
+ left: 1rem;
634
+ right: 1rem;
635
+ text-align: center;
636
+ color: #6b7280;
637
+ font-size: 0.75rem;
638
+ ">
639
+ Made with πŸ’œ by Vidsimplify Team
640
+ </div>
641
+ """, unsafe_allow_html=True)
642
 
643
  # ============================================================================
644
  # Main Content
645
  # ============================================================================
646
 
647
+ # Hero section
648
+ st.markdown("""
649
+ <div style="text-align: center; margin-bottom: 2rem;">
650
+ <h1 style="
651
+ background: linear-gradient(135deg, #818cf8 0%, #c084fc 50%, #f472b6 100%);
652
+ -webkit-background-clip: text;
653
+ -webkit-text-fill-color: transparent;
654
+ background-clip: text;
655
+ font-size: 2.8rem;
656
+ font-weight: 800;
657
+ margin-bottom: 0.5rem;
658
+ ">Create Precision Animations</h1>
659
+ <p style="color: #a5b4fc; font-size: 1.1rem;">
660
+ Transform text, blogs, and documents into beautiful animated videos
661
+ </p>
662
+ </div>
663
+ """, unsafe_allow_html=True)
664
 
665
  # Input tabs
666
  tab1, tab2, tab3 = st.tabs(["πŸ“ Text / Script", "πŸ”— Blog / URL", "πŸ“„ PDF Document"])
 
699
  # Generate Button & Logic
700
  # ============================================================================
701
 
702
+ # Add spacing before button
703
+ st.markdown("<br>", unsafe_allow_html=True)
704
+
705
+ if st.button("✨ Create Animation", type="primary", use_container_width=True):
706
  if not input_data:
707
  st.error("Please provide input data.")
708
  else:
 
786
  # Footer
787
  # ============================================================================
788
 
789
+ st.markdown("""
790
+ <div style="
791
+ margin-top: 3rem;
792
+ padding: 1.5rem 0;
793
+ border-top: 1px solid rgba(99, 102, 241, 0.2);
794
+ text-align: center;
795
+ ">
796
+ <div style="display: flex; justify-content: center; align-items: center; gap: 2rem; flex-wrap: wrap;">
797
+ <span style="color: #6b7280; font-size: 0.85rem;">
798
+ ✨ <strong style="color: #a5b4fc;">Vidsimplify</strong> β€” Precision Animations
799
+ </span>
800
+ <span style="color: #4b5563; font-size: 0.8rem;">|</span>
801
+ <span style="color: #6b7280; font-size: 0.85rem;">
802
+ Made with πŸ’œ by Vidsimplify Team
803
+ </span>
804
+ <span style="color: #4b5563; font-size: 0.8rem;">|</span>
805
+ <span style="color: #6b7280; font-size: 0.85rem;">
806
+ Β© 2024 All rights reserved
807
+ </span>
808
+ </div>
809
+ </div>
810
+ """, unsafe_allow_html=True)
811
+