shaoyent commited on
Commit
91f6016
1 Parent(s): a5a317e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -0
app.py CHANGED
@@ -59,6 +59,13 @@ html_title = '''
59
 
60
  client = Client("http://198.175.88.247:17810/")
61
 
 
 
 
 
 
 
 
62
  def generate(
63
  prompt: str,
64
  negative_prompt: str,
@@ -77,6 +84,8 @@ def generate(
77
  fn_index=1
78
  )
79
 
 
 
80
  return result
81
 
82
  with gr.Blocks(theme=theme, css=css) as demo:
 
59
 
60
  client = Client("http://198.175.88.247:17810/")
61
 
62
+ def get_iframe(rgb_path: str, depth_path: str, viewer_mode: str = "6DOF"):
63
+
64
+ if viewer_mode == "6DOF":
65
+ return f"""<iframe src="file=static/three6dof.html" width="100%" height="500px" data-rgb="{rgb_path}" data-depth="{depth_path}"></iframe>"""
66
+ else:
67
+ return f"""<iframe src="file=static/depthmap.html" width="100%" height="500px" data-rgb="{rgb_path}" data-depth="{depth_path}"></iframe>"""
68
+
69
  def generate(
70
  prompt: str,
71
  negative_prompt: str,
 
84
  fn_index=1
85
  )
86
 
87
+ result[-1] = get_iframe(result[0], result[1])
88
+
89
  return result
90
 
91
  with gr.Blocks(theme=theme, css=css) as demo: