Jackoabaad commited on
Commit
afe2482
·
1 Parent(s): 0adaf31

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -9
app.py CHANGED
@@ -1,4 +1,4 @@
1
- import streamlit as st
2
  import os
3
  import nerf
4
  import torch
@@ -10,8 +10,8 @@ if not os.path.exists("Model"):
10
 
11
  # Check if the model is downloaded
12
  if not os.path.exists("Model/nerf_model.ckpt"):
13
- # Download the model
14
- wget https://github.com/bmild/nerf/releases/download/v0.5/nerf_model.ckpt
15
 
16
  # Load the NeRF model
17
  nerf_model = nerf.NeRF.load("Model/nerf_model.ckpt")
@@ -33,9 +33,3 @@ novel_view = nerf_model.render(viewing_direction, camera)
33
 
34
  # Save the novel view
35
  torch.save(novel_view, "novel_view.png")
36
-
37
- # Create a Streamlit app
38
- st.title("NeRF with Dolly Zoom")
39
-
40
- # Show the image
41
- st.image("novel_view.png")
 
1
+ import subprocess
2
  import os
3
  import nerf
4
  import torch
 
10
 
11
  # Check if the model is downloaded
12
  if not os.path.exists("Model/nerf_model.ckpt"):
13
+ # Download the model using the subprocess module
14
+ subprocess.run(["wget", "https://github.com/bmild/nerf/releases/download/v0.5/nerf_model.ckpt"])
15
 
16
  # Load the NeRF model
17
  nerf_model = nerf.NeRF.load("Model/nerf_model.ckpt")
 
33
 
34
  # Save the novel view
35
  torch.save(novel_view, "novel_view.png")