Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,9 +5,12 @@ from flax.serialization import msgpack_restore, from_state_dict
|
|
| 5 |
fs = HfFileSystem()
|
| 6 |
|
| 7 |
with fs.open("PrakhAI/HelloWorld/checkpoint.msgpack", "rb") as f:
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
|
|
|
|
|
|
|
|
|
| 11 |
|
| 12 |
x = st.slider('Select a value')
|
| 13 |
st.write(x, 'squared is', x * x)
|
|
|
|
| 5 |
fs = HfFileSystem()
|
| 6 |
|
| 7 |
with fs.open("PrakhAI/HelloWorld/checkpoint.msgpack", "rb") as f:
|
| 8 |
+
state = msgpack_restore(f.read())
|
| 9 |
+
|
| 10 |
+
print(type(state))
|
| 11 |
+
|
| 12 |
+
# logits = state.apply_fn({'params': state.params}, batch['image'])
|
| 13 |
+
# print(logits)
|
| 14 |
|
| 15 |
x = st.slider('Select a value')
|
| 16 |
st.write(x, 'squared is', x * x)
|