Spaces:
Sleeping
Sleeping
| import gradio as gr | |
| import docs | |
| async def call_my_api(message, history): | |
| return f"Response to: {message}" | |
| with gr.Blocks( | |
| theme=gr.themes.Soft( | |
| primary_hue="blue", | |
| secondary_hue="blue", | |
| neutral_hue="slate", | |
| font=["Inter", "sans-serif"], | |
| ), | |
| title="Agent medGemma" | |
| ) as demo: | |
| chatbot = gr.Chatbot( | |
| type="messages", | |
| height=600 | |
| ) | |
| with gr.Row(): | |
| with gr.Column(scale=2): | |
| gr.Markdown("# π₯ Agent MedGemma") | |
| with gr.Column(scale=3): | |
| gr.Markdown( | |
| "<div>Simple and accessible medical facts</div>" | |
| ) | |
| with gr.Row(): | |
| with gr.Column(scale=1): | |
| chat_interface = gr.ChatInterface( | |
| fn=call_my_api, | |
| chatbot=chatbot, | |
| theme="soft" | |
| ) | |
| with demo.route("Technical Documentation", "/docs"): | |
| docs.tabs_issue.render() | |
| if __name__ == "__main__": | |
| demo.launch() |