Update app.py
Browse files12345618 unmodified lines25262728293031327 unmodified lines4041424344import 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: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 functionsubmit_btn.click(fn=aws_architect_agent, inputs=input_text, outputs=output_text)# 5. Launch the appdemo.launch()1234518 unmodified lines24252627282930317 unmodified lines3940414243import gradio as grfrom huggingface_hub import InferenceClient# 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 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 functionsubmit_btn.click(fn=aws_architect_agent, inputs=input_text, outputs=output_text)# 5. Launch the app (THEME MOVED HERE for Gradio 6.0)demo.launch(theme=gr.themes.Soft())
app.py+4-5