Test Notebook

Migrate from proprietary APIs to open-source alternatives

Difficulty: Medium Time: 45 minutes Category: Migration

nbgradio Test Notebook

This notebook demonstrates the nbgradio library with a simple Gradio app.

Loading...

Another Section

The code block above used the #nbgradio syntax so that it is launched as a Gradio app. If you don't add that comment block, the nbgradio will treat it as "regular" code that should just be syntax highlighted:

def calculate_fibonacci(n):
    """Calculate the nth Fibonacci number."""
    if n <= 1:
        return n
    return calculate_fibonacci(n - 1) + calculate_fibonacci(n - 2)


# Test the function
for i in range(10):
    print(f"F({i}) = {calculate_fibonacci(i)}")