File size: 539 Bytes
9259f41
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import gradio as gr
import sys

def execute(code, lang)
    return "Typeof code : " + type(code) + "\nCode : " + str(code) + "\nTypeof language : " + type(lang) + "\nLanguage : " + str(lang)

demo = gr.Interface(
    fn=execute,
    inputs=[
        gr.Textbox(
            show_label=True,
            label="Code",
            max_lines=sys.maxint
        ),
        gr.Dropdown(
            show_label=True,
            label="Language",
            choices=["Python"]
        )
    ],
    outputs="text"
    
)

demo.launch(debug=True)