File size: 437 Bytes
d9b3a7d
5053d32
42cae27
5053d32
 
 
9a3a908
5053d32
 
9a3a908
5053d32
 
9a3a908
5053d32
9a3a908
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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()