Spaces:
Sleeping
Sleeping
Commit
·
f233163
1
Parent(s):
bdb1e12
Added requirements.txt
Browse files
app.py
CHANGED
@@ -2,8 +2,9 @@ import numpy as np
|
|
2 |
from scipy import signal
|
3 |
import huggingface_hub # for loading model
|
4 |
import streamlit as st
|
5 |
-
from transformers import AutoModel
|
6 |
-
import
|
|
|
7 |
# HELLO HUGGING FACE
|
8 |
|
9 |
|
@@ -135,9 +136,9 @@ interp_length = st.selectbox("Interpolation Length", interpolation_options)
|
|
135 |
# Load the models from existing huggingface model
|
136 |
# Load the encoder model
|
137 |
# encoder_model_boxes = huggingface_hub.from_pretrained_keras("cmudrc/2d-lattice-encoder")
|
138 |
-
encoder_model =
|
139 |
# Load the decoder model
|
140 |
# decoder_model_boxes = huggingface_hub.from_pretrained_keras("cmudrc/2d-lattice-decoder")
|
141 |
-
decoder_model =
|
142 |
|
143 |
|
|
|
2 |
from scipy import signal
|
3 |
import huggingface_hub # for loading model
|
4 |
import streamlit as st
|
5 |
+
# from transformers import AutoModel
|
6 |
+
from transformers import TFAutoModel
|
7 |
+
import torch # Needed for importing torch to use in the transformers model
|
8 |
# HELLO HUGGING FACE
|
9 |
|
10 |
|
|
|
136 |
# Load the models from existing huggingface model
|
137 |
# Load the encoder model
|
138 |
# encoder_model_boxes = huggingface_hub.from_pretrained_keras("cmudrc/2d-lattice-encoder")
|
139 |
+
encoder_model = TFAutoModel.from_pretrained("cmudrc/2d-lattice-encoder")
|
140 |
# Load the decoder model
|
141 |
# decoder_model_boxes = huggingface_hub.from_pretrained_keras("cmudrc/2d-lattice-decoder")
|
142 |
+
decoder_model = TFAutoModel.from_pretrained("cmudrc/2d-lattice-decoder")
|
143 |
|
144 |
|