PrakhAI commited on
Commit
bbf2c61
·
1 Parent(s): 54d5b98

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -1,11 +1,12 @@
1
  import streamlit as st
2
  from huggingface_hub import HfFileSystem
3
- from flax.serialization import msgpack_restore
4
 
5
  fs = HfFileSystem()
6
 
7
  with fs.open("PrakhAI/HelloWorld/checkpoint.msgpack", "rb") as f:
8
- model = msgpack_restore(f.read())
 
9
 
10
  x = st.slider('Select a value')
11
  st.write(x, 'squared is', x * x)
 
1
  import streamlit as st
2
  from huggingface_hub import HfFileSystem
3
+ from flax.serialization import msgpack_restore, from_state_dict
4
 
5
  fs = HfFileSystem()
6
 
7
  with fs.open("PrakhAI/HelloWorld/checkpoint.msgpack", "rb") as f:
8
+ state_dict = msgpack_restore(f.read())
9
+ print(state_dict)
10
 
11
  x = st.slider('Select a value')
12
  st.write(x, 'squared is', x * x)