File size: 280 Bytes
f125758
 
 
 
 
 
c0b147d
 
1
2
3
4
5
6
7
8
import gradio as gr

def greet_with_age(name: str, age: int) -> str:
    return f"Hello, {name}! You are {age} years old."

# Inputs as a list: [textbox for name, number input for age]
demo = gr.Interface(fn=greet_with_age, inputs=["text", "number"], outputs="text")
demo.launch()