import gradio as gr from synthscope import GoogleSearchImageGen with gr.Blocks(theme=gr.themes.Base(primary_hue="teal", secondary_hue="amber").set( body_background_fill="*neutral_950", body_text_color="*neutral_200", background_fill_primary="*neutral_900", background_fill_secondary="*neutral_800", border_color_primary="*neutral_700", block_background_fill="*neutral_900", input_background_fill="*neutral_800", button_primary_background_fill="*primary_600", button_primary_background_fill_hover="*primary_700", button_secondary_background_fill="*neutral_700", button_secondary_background_fill_hover="*neutral_600" ), css=""" footer {display: none !important;} body { background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%); color: #e2e8f0; } .audio-container { padding: 10px; border-radius: 8px; background: rgba(30, 41, 59, 0.8); border: 1px solid rgba(100, 116, 139, 0.3); } .audio-container audio { width: 100%; height: 60px; border-radius: 6px; background: #1e293b; } .output-section { margin-bottom: 20px; padding: 15px; border-radius: 10px; background: rgba(30, 41, 59, 0.6); border: 1px solid rgba(100, 116, 139, 0.3); box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3); backdrop-filter: blur(10px); } .input-section { padding: 20px; background: rgba(15, 23, 42, 0.8); border: 1px solid rgba(20, 184, 166, 0.3); border-radius: 10px; margin-top: 20px; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3); } .section-title { color: #14b8a6; font-weight: bold; margin-bottom: 10px; font-size: 1.1em; text-shadow: 0 0 10px rgba(20, 184, 166, 0.3); } h1 { color: #14b8a6 !important; text-shadow: 0 0 20px rgba(20, 184, 166, 0.4); } h4 { color: #14b8a6 !important; text-shadow: 0 0 10px rgba(20, 184, 166, 0.3); } .gradio-container { background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%) !important; } """) as app: gr.HTML("
") gr.HTML("SynthScope enables you to return web search results as text, image, and translated audio simultaneously.
") # Collapsible Sidebar for Controls with gr.Sidebar(elem_classes="input-section"): gr.HTML("Your search results will appear below once processing is complete
") # Text and Image side by side with gr.Row(): with gr.Column(scale=1): gr.HTML("Audio will be generated in your selected language and voice
") # Footer with usage tips gr.HTML("""
• Be specific in your search queries for more accurate results
• Try different visual styles to match your content theme
• Audio generation works best with shorter text summaries
• Processing may take 30-60 seconds depending on complexity