Spaces:
Sleeping
Sleeping
Commit
·
149e201
1
Parent(s):
18fd9fb
Updating to get the model imports to work
Browse files- app.py +3 -2
- requirements.txt +1 -0
app.py
CHANGED
|
@@ -2,6 +2,7 @@ import numpy as np
|
|
| 2 |
from scipy import signal
|
| 3 |
import math
|
| 4 |
# import huggingface_hub # for loading model
|
|
|
|
| 5 |
import streamlit as st
|
| 6 |
# from transformers import AutoModel
|
| 7 |
# from transformers import TFAutoModel
|
|
@@ -281,10 +282,10 @@ if st.button("Generate Endpoint Images"):
|
|
| 281 |
|
| 282 |
# Load the models from existing huggingface model
|
| 283 |
# Load the encoder model
|
| 284 |
-
encoder_model_boxes =
|
| 285 |
# encoder_model = TFAutoModel.from_pretrained("cmudrc/2d-lattice-encoder")
|
| 286 |
# Load the decoder model
|
| 287 |
-
decoder_model_boxes =
|
| 288 |
# decoder_model = TFAutoModel.from_pretrained("cmudrc/2d-lattice-decoder")
|
| 289 |
|
| 290 |
|
|
|
|
| 2 |
from scipy import signal
|
| 3 |
import math
|
| 4 |
# import huggingface_hub # for loading model
|
| 5 |
+
from huggingface_hub import from_pretrained_keras
|
| 6 |
import streamlit as st
|
| 7 |
# from transformers import AutoModel
|
| 8 |
# from transformers import TFAutoModel
|
|
|
|
| 282 |
|
| 283 |
# Load the models from existing huggingface model
|
| 284 |
# Load the encoder model
|
| 285 |
+
encoder_model_boxes = from_pretrained_keras("cmudrc/2d-lattice-encoder")
|
| 286 |
# encoder_model = TFAutoModel.from_pretrained("cmudrc/2d-lattice-encoder")
|
| 287 |
# Load the decoder model
|
| 288 |
+
decoder_model_boxes = from_pretrained_keras("cmudrc/2d-lattice-decoder")
|
| 289 |
# decoder_model = TFAutoModel.from_pretrained("cmudrc/2d-lattice-decoder")
|
| 290 |
|
| 291 |
|
requirements.txt
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
matplotlib==3.5.2
|
| 2 |
numpy==1.21.5
|
| 3 |
scipy==1.9.1
|
|
|
|
| 1 |
+
huggingface_hub==0.12.0
|
| 2 |
matplotlib==3.5.2
|
| 3 |
numpy==1.21.5
|
| 4 |
scipy==1.9.1
|