asynchronousai commited on
Commit
b7f059f
·
verified ·
1 Parent(s): f68fedc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -97,7 +97,7 @@ class Monochrome(Base):
97
  )
98
 
99
 
100
- folder_path = 'src/server'
101
  file_name = 'main.cs'
102
  file_path = os.path.join(folder_path, file_name)
103
  os.makedirs(folder_path, exist_ok=True)
@@ -129,7 +129,10 @@ def compile(cs):
129
  except:
130
  gr.Error("Unknown error!")
131
 
132
- return 'ha'
 
 
 
133
 
134
  demo = gr.Interface(fn=compile, inputs="text", outputs="text", theme=Monochrome())
135
  demo.launch()
 
97
  )
98
 
99
 
100
+ folder_path = 'src/Server'
101
  file_name = 'main.cs'
102
  file_path = os.path.join(folder_path, file_name)
103
  os.makedirs(folder_path, exist_ok=True)
 
129
  except:
130
  gr.Error("Unknown error!")
131
 
132
+ # Read
133
+ with open('out/Server/main.lua', 'r') as file:
134
+ content = file.read()
135
+ return content
136
 
137
  demo = gr.Interface(fn=compile, inputs="text", outputs="text", theme=Monochrome())
138
  demo.launch()