Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,11 +1,11 @@
|
|
| 1 |
import gradio as gr
|
|
|
|
| 2 |
|
| 3 |
-
def execute(
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
return f"Code : {str(code)}\nTypeof lang : {str(type(lang))}\nLanguage : {str(lang)}"
|
| 9 |
|
| 10 |
demo = gr.Interface(
|
| 11 |
fn=execute,
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
+
import requests
|
| 3 |
|
| 4 |
+
def execute(codeSnippet, lang):
|
| 5 |
+
res = requests.request("POST", f"https://try.w3schools.com/try_{lang.lower()}.php", data={
|
| 6 |
+
code=codeSnipper
|
| 7 |
+
})
|
| 8 |
+
return res.text
|
|
|
|
| 9 |
|
| 10 |
demo = gr.Interface(
|
| 11 |
fn=execute,
|