testnow720's picture
Create app.py
9259f41 verified
raw
history blame
539 Bytes
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)