Mattia2700 commited on
Commit
766fbfc
·
1 Parent(s): df0ec9d

feat: try running scene generation

Browse files
Files changed (1) hide show
  1. app.py +17 -1
app.py CHANGED
@@ -1,10 +1,26 @@
1
  import os
2
 
3
  import gradio as gr
 
 
 
4
 
5
  def load_mesh(mesh_file_name):
 
 
 
 
6
  return mesh_file_name
7
 
 
 
 
 
 
 
 
 
 
8
  iface = gr.Interface(fn=load_mesh,
9
  inputs=gr.Model3D(),
10
  outputs=gr.Model3D(
@@ -18,4 +34,4 @@ iface = gr.Interface(fn=load_mesh,
18
  )
19
 
20
  if __name__ == "__main__":
21
- iface.launch()
 
1
  import os
2
 
3
  import gradio as gr
4
+ from text2room.generate_scene import main
5
+ from text2room.model.utils.opt import get_default_parser
6
+
7
 
8
  def load_mesh(mesh_file_name):
9
+ parser = get_default_parser()
10
+ args = parser.parse_args()
11
+ main(args)
12
+ search_files(".ply")
13
  return mesh_file_name
14
 
15
+ def search_files(extension):
16
+ # recursively search for files with the given extension
17
+ files = []
18
+ # print content of the current directory
19
+ print(os.listdir())
20
+ # print content of the text2room directory
21
+ print(os.listdir("text2room"))
22
+ return files
23
+
24
  iface = gr.Interface(fn=load_mesh,
25
  inputs=gr.Model3D(),
26
  outputs=gr.Model3D(
 
34
  )
35
 
36
  if __name__ == "__main__":
37
+ iface.launch()