Spaces:
Running
Running
File size: 1,104 Bytes
c1bee18 6cb2ff0 c1bee18 9a48f85 c1bee18 6cb2ff0 c1bee18 6cb2ff0 c1bee18 6cb2ff0 c1bee18 79a256a c1bee18 a368442 c1bee18 9a48f85 a368442 c1bee18 6cb2ff0 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 |
"""
HF-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
from ui_components import (
create_main_header,
create_chat_tab,
create_image_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="HF-Inferoxy AI Hub", theme=get_gradio_theme()) as demo:
# 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)
# Footer with helpful information
create_footer()
return demo
if __name__ == "__main__":
app = create_app()
app.launch() |