testnow720 commited on
Commit
9259f41
·
verified ·
1 Parent(s): dd83c74

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +25 -0
app.py ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ import sys
3
+
4
+ def execute(code, lang)
5
+ return "Typeof code : " + type(code) + "\nCode : " + str(code) + "\nTypeof language : " + type(lang) + "\nLanguage : " + str(lang)
6
+
7
+ demo = gr.Interface(
8
+ fn=execute,
9
+ inputs=[
10
+ gr.Textbox(
11
+ show_label=True,
12
+ label="Code",
13
+ max_lines=sys.maxint
14
+ ),
15
+ gr.Dropdown(
16
+ show_label=True,
17
+ label="Language",
18
+ choices=["Python"]
19
+ )
20
+ ],
21
+ outputs="text"
22
+
23
+ )
24
+
25
+ demo.launch(debug=True)