asynchronousai commited on
Commit
de1f576
·
verified ·
1 Parent(s): bb4c477

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -0
app.py CHANGED
@@ -1,6 +1,13 @@
1
  import gradio as gr
 
 
 
2
 
3
  def compile(cs):
 
 
 
 
4
  return cs+" (but in lua)"
5
 
6
  demo = gr.Interface(fn=compile, inputs="text", outputs="text")
 
1
  import gradio as gr
2
+ folder_path = 'src/server'
3
+ file_name = 'main.cs'
4
+ file_path = os.path.join(folder_path, file_name)
5
 
6
  def compile(cs):
7
+ os.makedirs(folder_path, exist_ok=True)
8
+
9
+ with open(file_path, 'w') as file:
10
+ file.write(cs)
11
  return cs+" (but in lua)"
12
 
13
  demo = gr.Interface(fn=compile, inputs="text", outputs="text")