shaoyent commited on
Commit
fe8f919
1 Parent(s): f84c75b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -56,9 +56,9 @@ client = Client("http://198.175.88.247:17810/")
56
  def build_iframe(rgb_path: str, depth_path: str, viewer_mode: str = "6DOF"):
57
 
58
  if viewer_mode == "6DOF":
59
- return f"""<iframe src="file=static/three6dof.html" width="100%" height="500px" data-rgb="{rgb_path}" data-depth="{depth_path}"></iframe>"""
60
  else:
61
- return f"""<iframe src="file=static/depthmap.html" width="100%" height="500px" data-rgb="{rgb_path}" data-depth="{depth_path}"></iframe>"""
62
 
63
  def generate(
64
  prompt: str,
@@ -80,7 +80,7 @@ def generate(
80
 
81
  iframe = build_iframe(rgb_url, depth_url)
82
 
83
- return rgb, depth, generated_seed, iframe
84
 
85
  with gr.Blocks(theme=theme, css=css) as demo:
86
  gr.HTML(value=html_title)
@@ -127,5 +127,5 @@ For better results, specify "360 view of" or "panoramic view of" in the prompt
127
  )
128
 
129
  demo.launch(
130
- allowed_paths=["assets/", "static/"]
131
  )
 
56
  def build_iframe(rgb_path: str, depth_path: str, viewer_mode: str = "6DOF"):
57
 
58
  if viewer_mode == "6DOF":
59
+ return f"""<iframe src="file=static/three6dof.html" width="100%" height="500px" data-rgb="/file={rgb_path}" data-depth="/file={depth_path}"></iframe>"""
60
  else:
61
+ return f"""<iframe src="file=static/depthmap.html" width="100%" height="500px" data-rgb="/file={rgb_path}" data-depth="/file={depth_path}"></iframe>"""
62
 
63
  def generate(
64
  prompt: str,
 
80
 
81
  iframe = build_iframe(rgb_url, depth_url)
82
 
83
+ return rgb_url, depth_url, generated_seed, iframe
84
 
85
  with gr.Blocks(theme=theme, css=css) as demo:
86
  gr.HTML(value=html_title)
 
127
  )
128
 
129
  demo.launch(
130
+ allowed_paths=["assets/", "static/", "/tmp/gradio/"]
131
  )