Update app.py
Browse files
app.py
CHANGED
|
@@ -10,8 +10,6 @@ from flax.serialization import msgpack_restore, from_state_dict
|
|
| 10 |
import os
|
| 11 |
import tensorflow as tf
|
| 12 |
|
| 13 |
-
hf_key = text_input = st.text_input("Access token")
|
| 14 |
-
|
| 15 |
def sigmoid(x):
|
| 16 |
return 1/(1+e**-x)
|
| 17 |
|
|
@@ -35,7 +33,7 @@ class CNN(nn.Module):
|
|
| 35 |
cnn = CNN()
|
| 36 |
params = cnn.init(jax.random.PRNGKey(0), jnp.ones([2, 50, 50, 3]))['params']
|
| 37 |
|
| 38 |
-
fs = HfFileSystem(
|
| 39 |
with fs.open("PrakhAI/CatVsDog/checkpoint.msgpack", "rb") as f:
|
| 40 |
params = from_state_dict(params, msgpack_restore(f.read())["params"])
|
| 41 |
|
|
|
|
| 10 |
import os
|
| 11 |
import tensorflow as tf
|
| 12 |
|
|
|
|
|
|
|
| 13 |
def sigmoid(x):
|
| 14 |
return 1/(1+e**-x)
|
| 15 |
|
|
|
|
| 33 |
cnn = CNN()
|
| 34 |
params = cnn.init(jax.random.PRNGKey(0), jnp.ones([2, 50, 50, 3]))['params']
|
| 35 |
|
| 36 |
+
fs = HfFileSystem()
|
| 37 |
with fs.open("PrakhAI/CatVsDog/checkpoint.msgpack", "rb") as f:
|
| 38 |
params = from_state_dict(params, msgpack_restore(f.read())["params"])
|
| 39 |
|