Alesteba commited on
Commit
4f9f8a3
·
1 Parent(s): e858b0d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -35,6 +35,12 @@ from PIL import Image
35
 
36
  image = Image.open('./training(3).gif')
37
 
 
 
 
 
 
 
38
  st.markdown("[NeRF](https://arxiv.org/abs/2003.08934) proposes an ingenious way to synthesize novel views of a scene by modelling the volumetric scene function through a neural network. The network learns to model the volumetric scene, thus generating novel views (images) of the 3D scene that the model was not shown at training time.")
39
  st.markdown("![](https://github.com/alesteba/training_NeRF/blob/e89da9448b3993117c78532c14c7142970f0d8df/training(3).gif)")
40
  st.image(image, caption='Training Steps')
@@ -48,8 +54,8 @@ nerf_loaded = from_pretrained_keras("Alesteba/NeRF_ficus")
48
 
49
  # set the values of r theta phi
50
  r = 4.0
51
- theta = st.slider(min_value=0.0, max_value=360.0)
52
- phi = st.slider(min_value=0.0, max_value=360.0)
53
  # phi = -30.0
54
  color, depth = show_rendered_image(r, theta, phi)
55
 
 
35
 
36
  image = Image.open('./training(3).gif')
37
 
38
+ file = open(r'./training(3).gif', 'rb')
39
+ contents = file.read()
40
+ data_url = base64.b64encode(contents).decode('utf-8-sig')
41
+ file.close()
42
+ st.markdown(f'<img src="data:image/gif;base64,{data_url}>',unsafe_allow_html = True)
43
+
44
  st.markdown("[NeRF](https://arxiv.org/abs/2003.08934) proposes an ingenious way to synthesize novel views of a scene by modelling the volumetric scene function through a neural network. The network learns to model the volumetric scene, thus generating novel views (images) of the 3D scene that the model was not shown at training time.")
45
  st.markdown("![](https://github.com/alesteba/training_NeRF/blob/e89da9448b3993117c78532c14c7142970f0d8df/training(3).gif)")
46
  st.image(image, caption='Training Steps')
 
54
 
55
  # set the values of r theta phi
56
  r = 4.0
57
+ theta = st.slider("",min_value=0.0, max_value=360.0)
58
+ phi = st.slider("", min_value=0.0, max_value=360.0)
59
  # phi = -30.0
60
  color, depth = show_rendered_image(r, theta, phi)
61