Update app.py
Browse files12334518 unmodified lines242526282927282930317 unmodified lines39404143444243import gradio as grfrom huggingface_hub import InferenceClientimport os
# 1. Initialize the free Hugging Face AI client# We are using Mistral, a fast and highly capable free model18 unmodified lines ) return response.choices[0].message.content
# 4. Build the User Interfacewith gr.Blocks(theme=gr.themes.Soft()) as demo:# 4. Build the User Interface (NO theme here - moved to launch)with gr.Blocks() as demo: gr.Markdown("# 🏗️ AWS Solutions Architect Agent") gr.Markdown("Type your app idea below, and the AI Agent will recommend the AWS architecture.") 7 unmodified lines # Connect the button to the AI function submit_btn.click(fn=aws_architect_agent, inputs=input_text, outputs=output_text)
# 5. Launch the appdemo.launch()# 5. Launch the app (THEME MOVED HERE for Gradio 6.0)demo.launch(theme=gr.themes.Soft())app.py+4-5