Spaces:
Runtime error
Runtime error
import gradio as gr | |
from gradio.components import Ace | |
# Define a function that takes a code string as input and returns it as output | |
def echo_code(code): | |
return code | |
# Create an Ace component with Python mode and Monokai theme | |
ace = Ace(mode="python", theme="monokai") | |
# Create a gradio app with the Ace component as both input and output | |
iface = gr.Interface(fn=echo_code, inputs=ace, outputs=ace) | |
# Launch the app | |
iface.launch() | |