Skip to main content

Quick Start

1

Install Dependencies

First, install the required packages:
2

Create Script

Create a new file app.py:
3

Run Application

Run your Gradio app:

Features

Simple Interface

Create beautiful UIs with minimal code.

Markdown Support

Rich text output with built-in markdown rendering.

Copy Button

One-click copying of results.

Responsive Design

Mobile-friendly interface out of the box.

Understanding the Code

The example demonstrates a simple research assistant with these key components:
  1. Function Definition:
    • research() function that processes user input
    • Agent initialization and execution
    • Result formatting with markdown
  2. Interface Setup:
    • Input textbox configuration
    • Markdown output with copy button
    • Title and description settings
  3. Launch Configuration:
    • Main entry point check
    • Server launch with default settings

Customization

You can enhance the UI with additional Gradio components:

Next Steps