Spaces:
Running
Running
File size: 1,720 Bytes
c1bee18 c2e6d7e c1bee18 6cb2ff0 c1bee18 9a48f85 43a0ca3 6244d01 0d77564 c1bee18 43a0ca3 6244d01 0d77564 c1bee18 6cb2ff0 c1bee18 6cb2ff0 c1bee18 c2e6d7e 9a50492 c1bee18 79a256a c1bee18 a368442 c1bee18 9a48f85 a368442 c1bee18 43a0ca3 0d77564 6244d01 0d77564 bf154be c1bee18 6cb2ff0 c1bee18 6cb2ff0 c1bee18 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
"""
AI-Inferoxy AI Hub - Main application entry point.
A comprehensive AI platform with chat and image generation capabilities.
"""
import gradio as gr
from chat_handler import handle_chat_submit, handle_chat_retry
from image_handler import handle_image_generation, handle_image_to_image_generation
from video_handler import handle_video_generation
from tts_handler import handle_text_to_speech_generation
from ui_components import (
create_main_header,
create_chat_tab,
create_image_tab,
create_image_to_image_tab,
create_video_tab,
create_tts_tab,
create_footer
)
from utils import get_gradio_theme
def create_app():
"""Create and configure the main Gradio application."""
# Create the main Gradio interface with tabs
with gr.Blocks(title="AI-Inferoxy AI Hub", theme=get_gradio_theme()) as demo:
# Sidebar with HF OAuth login/logout
with gr.Sidebar():
gr.LoginButton()
# Main header
create_main_header()
with gr.Tabs() as tabs:
# Chat tab
create_chat_tab(handle_chat_submit, handle_chat_retry)
# Image generation tab
create_image_tab(handle_image_generation)
# Image-to-image tab
create_image_to_image_tab(handle_image_to_image_generation)
# Text-to-Video tab
create_video_tab(handle_video_generation)
# Text-to-speech tab
create_tts_tab(handle_text_to_speech_generation)
# Footer with helpful links
create_footer()
return demo
if __name__ == "__main__":
app = create_app()
app.launch() |