Spaces:
Running
Running
File size: 355 Bytes
918b834 de1f576 918b834 bb4c477 de1f576 bb4c477 918b834 bb4c477 918b834 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
import gradio as gr
folder_path = 'src/server'
file_name = 'main.cs'
file_path = os.path.join(folder_path, file_name)
def compile(cs):
os.makedirs(folder_path, exist_ok=True)
with open(file_path, 'w') as file:
file.write(cs)
return cs+" (but in lua)"
demo = gr.Interface(fn=compile, inputs="text", outputs="text")
demo.launch()
|