Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
|
|
|
| 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)
|